π) or the square root of a number. In addition, it can also be used to generate random numbers.
It's important to remember that the
(Note: We won't cover all of these properties and methods in detail as some of them are a little more complicated than what we are dealing with right now.)
|E||The value of Euler's constant, approximately 2.718|
|LN2||The natural logarithm of 2, approximately 0.693|
|LN10||The natural logarithm of 10, approximately 2.302|
|LOG2E||The base 2 logarithm of E, approximately 1.442|
|LOG10E||The base 10 logarithm of E, approximately 0.434|
||The ratio of the circumference of a circle to its diameter, approximately 3.14159|
|SQRT1_2||Square root of 1/2; equivalently, 1 over the square root of 2, approximately 0.707|
|SQRT2||Square root of 2, approximately 1.414|
You can use this script to calculate the circumference of a circle using Pi by entering the radius:
Let's see what we did in this script.
You would then add this in the
body section of the page in order to call the script above: