Skip to content

Instantly share code, notes, and snippets.

@InPermutation
Created March 29, 2013 20:45
Show Gist options
  • Select an option

  • Save InPermutation/5273526 to your computer and use it in GitHub Desktop.

Select an option

Save InPermutation/5273526 to your computer and use it in GitHub Desktop.
Negative zero is not actually identical to positive zero.
// [true, true, true]:
[
0 === -0,
Math.atan2(0, -0) === Math.PI,
Math.atan2(0, 0) === 0
]
// [false, false]:
[
-0 < 0,
0 > -0
]
@InPermutation
Copy link
Copy Markdown
Author

See http://es5.github.com/#x15.8.2.5 for explanation of the behavior of Math.atan2

@busticated
Copy link
Copy Markdown

the math! it burns!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment