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

Add abstracts for Degrees/Radians #584

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

bendmorris
Copy link
Member

@bendmorris bendmorris commented Mar 24, 2018

Adds type safety around working with degrees/radians, and eliminates the need to convert explicitly via * MathUtil.RAD etc.

var degs:Degrees = 180;
var rads:Radians = degs;
trace(rads); // "-1.0*PI"

Breaking as Degrees can't be used in place of a Float, so Math.sin(angle * MathUtil.RAD) usage will need to be updated to use a cast or Degrees.sin.

@bendmorris bendmorris added this to the 5.0 milestone Mar 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant