Maths - (Built-in Functions)
Expression Syntax: Abs(number)
number: A number or a property representing a number.
Examples:
Abs(-1.234)
returns 1.234
Abs(_ox#)
returns the absolute value of Origin X, for example 464358.68270295
Expression Syntax: Acos(number)
number A cosine value.
Examples:
Acos(0.785398)
returns 0.667457480002253
Acos(cosine#)
returns the angle in radians of the cosine# value
Expression Syntax: Asin(number)
number A sine value.
Examples:
Asin(0.785398)
returns 0.903338846792644
Asin(sine#)
returns the angle in radians of the sine# value
Expression Syntax: Atan(number)
number A tangent value.
Examples:
Atan(0.785398)
returns 0.665773648969237
Atan(tan#)
returns the angle in radians of the tan# value
Expression Syntax: Atan2(y, x)
y The Y component of the tangent value.
x The X component of the tangent value.
Examples:
Atan2(1.234,1.234)
returns 0.785398163397448
Atan2(Y#,X#)
returns the angle in radians of the tangent value y/x in the range Y#,X#
Expression Syntax: Chr(ascii)
ascii an ASCII value.
Example:
Chr(97)
will return the character equivalent of the ASCII value, in this example "a".
Expression Syntax: Cos(angle)
angle a number of radians or a property in radians.
Examples:
Cos(30)
returns 0.154251449887584
Cos(_angle#)
returns the cosine of _angle#
Expression Syntax: Cot(angle)
angle a number of radians or a property in radians.
Examples:
Cot(30)
returns -0.156119952161657
Cot(_angle#)
returns the cotangent of _angle#
Expression Syntax: Degrees()
Examples:
Degrees(2.5)
returns 143.239448782706
Degrees(_angle#)
returns the degree value of _angle# specified in radians
Expression Syntax: Exp(number)
number a floating point number
Example:
Exp(10)
returns 22026.4657948067
Exp(Magnitude#)
returns the natural exponent of the Magnitude# property.
Expression Syntax: Fix(number)
number a floating point number
Example:
Fix(123.45678)
returns 123
Note: The Fix expression function will fail if the source value is floating point (e.g. double) and outside of the [–2147483648,2147483647] range.
Expression Syntax: Int(number)
number a floating point number
Example:
Int(12.345)
returns 12
Note: The Int expression function will fail if the source value is floating point (e.g. double) and outside of the [–2147483648,2147483647] range.
Expression Syntax: Log(number)
number a floating point number
Example:
Log(12.345)
returns 2.51325112279714
Expression Syntax: Log10(number)
number
a floating point number
Example:
Log10(12.345)
returns 1.09149109426795
Expression Syntax: Max(number1, number2)
number1, number2
floating point numbers or integers
Example:
Max(5678,1234)
returns the larger of the two numbers, in this example 5678 will be returned.
Expression Syntax: Min(number1, number2)
number1, number2
floating point numbers or integers
Example:
Min(5678,1234)
returns the smaller of the two numbers, in this example 1234 will be returned.
Expression Syntax: Pi()
Examples:
Pi()*2
returns the value of Pi multiplied by 2, i.e. 6.283185307177959.
Pi()^2
returns the value of Pi squared, i.e. 9.86960440108936.
Expression Syntax: Radians()
Example:
Radians(180)
returns the radian value of 180 degress, i.e. 3.14159265358979.
Radians(_angle#)returns the radian value of _angle# specified in degrees
Expression Syntax: Round(number, places)
number: The floating point number to round.
places Optional number of decimal places. Use 0 for an integer, 1 for one decimal place, -1 for nearest multiple of 10, -2 for nearest multiple of 100 etc.
Examples:
Round(12.3456789,3) - will return 12.345
Round(12.56789,0) - will return 13
Round(1256.567,-1) - will return 1260
Round(1256.567,-2) - will return 1300
Round(_area#,0) - will return area as an integer
Note: The Round expression function will fail if the source value is floating point (e.g. double) and outside of the [–2147483648,2147483647] range.
Expression Syntax: Sign()
Examples:
Sign(12)
returns 1
Sign(-12)
returns -1
Sign(_angle#)
returns 1 or -1 depending on the sign of _angle#.
Expression Syntax: Sin(angle)
angle An angle, in radians.
Examples:
Sin(1.5708)
returns 0.850903524534118
Sin(_angle#)
returns the sine of _angle#
Expression Syntax: Sqrt(number)
number: floating point number or integer
Examples:
Sqrt(169)
returns 13
Sqrt(_area#)
returns the square root of _area#
Expression Syntax: Tan(angle)
angle: An angle, in radians.
Examples:
Tan(45)
returns 1.61977519054386
Tan(_angle#)'
returns the tangent of angle