Javascript: PR for adding all math constants

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

2 Likes

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

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);
1 Like

OK, sounds good then, thanks!