Chapter 3 DynaScript Predefined Objects
The Math object provides basic Math functionality to users.
Standard: ECMAScript
To use a Math property:
Math.propertyName
To use a Math method:
Math.MethodName( parameter )
The Math object provides basic math functionality in your PowerDynamo script or template.
The Math object is provided as a built-in object. There are no constructors for creating instances of a Math object. When referring to Math in this chapter, we are referring to the built-in Math object, not an instance of the Math object.
This example uses the pow
method
of the Math object and displays the results:
<!--SCRIPT
ans = Math.pow( 4, 3 );
document.WriteLn(ans)
-->
Copyright © 1999 Sybase, Inc. All rights reserved. |