Chapter 3 DynaScript Predefined Objects
The Math
object
has these properties:
Math.E
This property is read-only.
Returns the number value for e, the base of the natural logarithms, which is approximately 2.71828182845905.
Floating point.
To display the value of e:
<!--SCRIPT
a = Math.E;
document.WriteLn( a );
-->
Math.LN2
This property is read-only.
Returns the number value for the natural logarithm of 2, which is approximately 0.693147180559945.
Floating point.
To display the value of LN2:
<!--SCRIPT
a = Math.LN2;
document.WriteLn( a );
-->
Math.LN10
This property is read-only.
Returns the value for the natural logarithm of 10, which is approximately 2.30258509299405.
Floating point.
To display the value of LN10:
<!--SCRIPT
a = Math.LN10;
document.WriteLn( a );
-->
Math.LOG2E
This property is read-only.
Returns the number value for the base-2 logarithm of e, Euler's constant. This value is approximately 1.44269504088896.
Floating point.
To display the value of LOG2E:
<!--SCRIPT
a = Math.LOG2E;
document.WriteLn( a );
-->
Math.LOG10E
This property is read-only.
Returns the number value for the base-10 logarithm of e, Euler's constant. This value is approximately 0.434294481903252.
Floating point.
To display the value of LOG10E:
<!--SCRIPT
a = Math.LOG10E;
document.WriteLn( a );
-->
Math.PI
This property is read-only.
Returns the ratio of the circumference of a circle to its diameter, which is approximately 3.14159265358979.
Floating point.
To display the value of PI:
<!--SCRIPT
a = Math.PI;
document.WriteLn( a );
-->
Math.SQRT1_2
This property is read-only.
Returns the number value for the square root of 1/2, which is approximately 0.707106781186548.
Floating point.
To display the value of the square root of 1/2:
<!--SCRIPT
a = Math.SQRT1_2;
document.WriteLn( a );
-->
Math.SQRT2
This property is read-only.
Returns the number value for the square root of 2, which is approximately 1.4142135623731.
Floating point.
To display the value of the square root of 2:
<!--SCRIPT
a = Math.SQRT2;
document.WriteLn( a );
-->
Copyright © 1999 Sybase, Inc. All rights reserved. |
![]() |