Image bm252.GIF Functions
Calculations
 
Image bm281.GIF random number (0 <= x < 1)
 
The random number returns the value of 0 till the number entered. Without specifying the range, the random number returns 0 till 1. The interval of possible random number values includes zero, but it does not include the terminal value. For example, for the implicit interval 0 till 1 the resulting random number can reach the value of 0, but it can never reach the value of 1, the number being always close below the value of 1 as the maximum.
 
Image bm282.GIF square power
Image bm283.GIF square root
Image bm284.GIF absolute value
Image bm285.GIF integer part
Image bm286.GIF fractional part
Image bm287.GIF increment (adds 1)
Image bm288.GIF decrement (subtracts 1)
 
The function of splitting the number in the integer and the fractional part does not depend on the sign, int(-x) = -int(x).
 
Image bm289.GIF sine
Image bm290.GIF cosine
Image bm291.GIF tangent
Image bm292.GIF cotangent
Image bm293.GIF arcsine
Image bm294.GIF arccosine
Image bm295.GIF arctangent
Image bm296.GIF arccotangent
Image bm297.GIF convert degrees to radians
Image bm298.GIF convert radians to degrees
 
The goniometric functions calculations are carried out in radian. If a calculation in degree is required, the function converting degrees and radians may be used.
 
Image bm299.GIF decadic logarithm
Image bm300.GIF natural logarithm
Image bm301.GIF natural exponential function
Image bm302.GIF factorial
 
The factorial calculation is carried out for an argument that is rounded up to the nearest integer value. The valid factorial argument ranges between -170 and +170. For negative argument values the calculation result for an odd number is negative, for an even number positive (odd or even number of multiplication operations).
 
Image bm303.GIF distance of point
Image bm304.GIF X coordinate of point
Image bm305.GIF Y coordinate of point
 
The distance of point function serves to calculate a point’s distance from the coordinate system origin or mutual distances of two points. As parameters the point’s coordinates or the two points‘ coordinate differences are specified.
 
Image bm306.GIF angle of point
Image bm304.GIF X coordinate of point
Image bm305.GIF Y coordinate of point
 
The angle of point function serves to calculate the point angle from the X-axis of the coordinate system or to calculate the angle of the direction defined by two points. As parameters the point’s coordinates or the two points‘ coordinate differences are specified.

Full Html Context Help of The Peter - Gemtree Software & Children Programming