Javascript: PR for adding all math constants


#1

Details found in the PR itself: https://github.com/WeAreROLI/JUCE/pull/338/files


#2

Are those the “official” constants that you get in a standard Javascript Math class?


#3

Yep, as outlined by W3 Math Properties (Constants). W3’s demonstration.

As outlined by Mozilla, and by Microsoft.

Example usage from within the JUCE Demo:

Demo.print (Math.E);
Demo.print (Math.PI);
Demo.print (Math.SQRT2);
Demo.print (Math.SQRT1_2);
Demo.print (Math.LN2);
Demo.print (Math.LN10);
Demo.print (Math.LOG2E);
Demo.print (Math.LOG10E);

#4

OK, sounds good then, thanks!