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

index: Use Math.PI over numeric constant #5

Closed
wants to merge 1 commit into from
Closed

index: Use Math.PI over numeric constant #5

wants to merge 1 commit into from

Conversation

kevinji
Copy link

@kevinji kevinji commented May 8, 2017

Due to the precision of JavaScript's doubles, the two numbers are equivalent.

Due to the precision of JavaScript's doubles, the two numbers are equivalent.
@kgryte
Copy link
Contributor

kgryte commented May 8, 2017

@mc10 Thanks for the PR; however, we're not interested in reassignment. Hard coding the number ensures that the constant is the coded value. Otherwise, someone could hijack global state (e.g., create a new Math object having a constant value which is no longer correct). One purpose of this package is to explicitly avoid globals.

@kgryte kgryte closed this May 8, 2017
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.

2 participants