Syntax: Math

The Math object allows you to perform a variety of scientific calculations in your script including functions for logarithms, trigonometry and geometry.

The Math functions provided in OpusScript are all part of the Math object and are either

    1. Math constants, such as PI (which maintains a constant number i.e. approximately 3.1415); or

    2. Math methods, such as acos (which you have to provide with information to calculate a result). See examples for more information.

Math Functions Overview

Syntax:

var varName = Math.functionName

Remarks:

var - is used to create a new variable in which the Math object will be stored.

varName – the name you want to give to the variable.

Math – the Math object – this must be followed by a full stop and then the name of the math function you want to perform.

functionName – the Math function name you want to perform – see Math Functions Overview for a list of Math functions.

image\Script_Button.jpgExamples