| Mathematical Functions ASP Script - ASP Web Pro |
|
ASP ScriptsMATHEMATICAL FUNCTIONSMath functions allow you to perform a variety of operations on number values in your scripts. Here are some of the most commonly used math functions:
The Abs function takes a number and returns its absolute value.
The Exp function takes a numeric value and returns e (the base of natural logarithms) raised to a power.
The Hex function returns a string value containing the value of an arguement converted to hexadecimal format. If the arguement is a fractional value, it is rounded to the nearest whole number before the function returns the string.
The Int function returns the whole number portion of a numeric arguement. If the arguement is a negative value, it returns the first integer value that is less than or equal to the arguement.
The Fix function returns the whole number portion of a numeric arguement. If the arguement is a negative value, it returns the first integer value that is greater than or equal to the arguement.
The Rnd function returns a random number. Switch indicates how the random number will be determined. If switch is a positive number, the next random number in the sequence should be returned. Before calling this function, you should initialize it by using the Randomize statement.
The Sgn function returns a numeric vale representing the sign of a number arguement. It returns 1 if the numeric value is > 0, 0 if = 0, and -1 if < 0.
The Sqr function returns the square root of a numeric arguement.
The Sin function returns the sine of an angle.
The Tan function returns the tangent of an angle.
|
||||||||||||
|
Main Menu Other Resources
Last Updated:
|
||||||||||||
|
© 1997-2008 ASP Web Pro, Inc. | Terms of Use
|