Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(math): Flesh out vector2d operators #207

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Apr 22, 2024

Description

  • Move equality operator into vector2d class
  • Add spaceship (<=>) operator to vector
  • Update implementation of scaling operator to work with more than just float scaling of float vectors using auto
  • Upadte math example to improve logging / readability (add logger)
  • Update math example to test integer vector explicitly
  • Update math example to test vector comparison operators explicity for both float and integer vectors
  • Update math example to better test piecewise_linear function

Motivation and Context

  • Allows scaling of integer vectors more easily
  • Allows math example logs to be visually parsed more easily
  • Check comparison operators directly
  • Spaceships are cool, so of course the spaceship operator (<=>) is cool too.

How has this been tested?

Building and running the math example on a QtPy ESP32S3.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2024-04-22 at 17 02 33

CleanShot 2024-04-22 at 17 02 45

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Move equality operator into vector2d class
* Add spaceship (<=>) operator to vector
* Update implementation of scaling operator to work with more than just float scaling of float vectors using auto
* Upadte math example to improve logging / readability (add logger)
* Update math example to test integer vector explicitly
* Update math example to test vector comparison operators explicity for both float and integer vectors
* Update math example to better test piecewise_linear function
@finger563 finger563 self-assigned this Apr 22, 2024
@finger563 finger563 added enhancement New feature or request math labels Apr 22, 2024
Copy link

✅Static analysis result - no issues found! ✅

@finger563 finger563 merged commit 7041b59 into main Apr 22, 2024
55 checks passed
@finger563 finger563 deleted the feature/vector-additional-operators branch April 22, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request math
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant