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

✨ AngleRange class #35

Merged
merged 4 commits into from
Jan 3, 2025
Merged

✨ AngleRange class #35

merged 4 commits into from
Jan 3, 2025

Conversation

SizzinSeal
Copy link
Member

@SizzinSeal SizzinSeal commented Jan 2, 2025

Overview

Adds the AngleRange class

Motivation

Consider the following:

Angle exitRange1 = 0_stDeg;
Angle exitRange2 = 0_cDeg;

in this example, exitRange1 is converted to 0 stDeg internally, while exitRange2 is converted to 90 stDeg internally. The 2 are not equal. To fix this, we need yet another helper class: AngleRange

AngleRange exitRange1 = 0_stDeg;
AngleRange exitRange2 = 0_cDeg;

Implementation

AngleRange inherits from the Angle class, so it works fine in Angle expressions (e.g AngleRange(0_stDeg) + 0_stDeg).
It can be constructed implicitly with both Angle and CAngle, with different behavior for each.

@SizzinSeal SizzinSeal merged commit ec18dd0 into main Jan 3, 2025
3 checks passed
@SizzinSeal SizzinSeal deleted the feat/AngleDistance branch January 3, 2025 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant