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

Wrong names of RAD_PER_DEG and DEG_PER_RAD constants #10

Open
ikokostya opened this issue Sep 20, 2017 · 0 comments
Open

Wrong names of RAD_PER_DEG and DEG_PER_RAD constants #10

ikokostya opened this issue Sep 20, 2017 · 0 comments

Comments

@ikokostya
Copy link

ikokostya commented Sep 20, 2017

Math.RAD_PER_DEG and Math.DEG_PER_RAD constants have invalid names in the current spec:

  • Math.RAD_PER_DEG is equal to 180 / PI, but must be equal PI / 180, because this constant means radians in one degree. Also Math.radians(degrees) must be computed as

    - 2. Let radians be (degrees × Math.DEG_PER_RAD).
    + 2. Let radians be (degrees × Math.RAD_PER_DEG).
  • Accordingly Math.DEG_PER_RAD must be equal 180 / PI, because it means number of degrees in one radian, and Math.degrees(radians) must be computed as:

    - 2. Let degrees be (radians × Math.RAD_PER_DEG).
    + 2. Let degrees be (radians × Math.DEG_PER_RAD).

Looks like this issue was introduced in the following commit b31aee6

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

No branches or pull requests

1 participant