Arithmetic Functions

Top  Previous  Next

For further information see: http://www.winguides.com/scripting

Abs() - Calculate Absolute Value of a Number
The Abs() function returns the absolute value of a number, i.e. its unsigned magnitude.

Atn() - Calculate the Arctangent of a Number
The Atn() function computes the inverse tangent, expressed in radians, of the supplied number.

Cos() - Calculates the Cosine of an Angle
The Cos() function takes an angle and calculates the ratio of two sides of a right triangle. The ratio is the length of the side adjacent to the angle divided by the length of the hypotenuse.

Exp() - Returns e raised to a power
The Exp() function returns e (the base of natural logarithms) raised to a power.

Fix() - Determine the integer portion of a number
The Fix() function returns the integer portion of a number.

FormatCurrency() - Formats a Number as a Currency
The FormatCurrency() function takes a number or expression and returns a formatted currency value using the currency symbol defined in the control panel.

FormatNumber() - Formats a Number
The FormatNumber() function takes a number or expression and returns a formatted number based on the parameters.

FormatPercent() - Formats a Number as a Percentage
The FormatCurrency() function takes a number or expression and returns a formatted percentage value with a trailing % character.

Hex() - Convert a Number to Hex
The Hex() function converts a number or expression to a string representation the hex value.

Int() - Determine the integer portion of a number
The Int() function returns the integer portion of a number.

Log() - Determine the natural logarithm of a number
The Log() function is used to determine the natural logarithm of a number.

Oct() - Convert a number to octal
The Oct() function converts a number or expression to a string representation the octal value.

Randomize - Seed the random-number generator
The Randomize statement is used to seed and initialize the random-number generator.

RGB() - Calculate an RGB color value
The RGB() function calculates an integer number representing an RGB color value.

Rnd() - Generate a random number
The Rnd() function generates a random number greater than zero but less than one.

Round() - Rounds a number to a specified number of decimal places
The Round() function takes a number or expression and rounds it off to the specified number of decimal places.

Sgn() - Determines the sign of a number
The Sgn() function is used to determine the sign of a number, i.e. whether it is greater than, equal to, or less than zero.

Sin() - Calculates the Sine of an angle
The Sin() function takes an angle and returns the ratio of two sides of a right triangle.

Sqr() - Calculates the square root
The Sqr() function takes a number and calculates the square root.

Tan() - Calculate the tangent of an angle
The Tan() function takes an angle and returns the ratio of two sides of a right triangle.