2.3.13 Math functions
The efun random()
will return an integer random number from 0 to
one less the number you give as an argument. For example
random(8)
will return an integer from 0 to 7.
The rest of the mathematical functions all return floats and take floats
as arguments. The trigonometric functions use radians, not degrees. Keep
this in mind.
- `float rnd()'
- Returns a random number in the range 0 (inclusive) to 1 (exclusive),
i.e. it might be 0, but never 1.
- `float sin(float)'
- Compute the sinus value of an angle.
- `float cos(float)'
- Compute the cosinus value of an angle.
- `float tan(float)'
- Compute the tangens value of an angle.
- `float asin(float)'
- Compute the arcus sinus value in the range -pi/2 to pi/2.
- `float acos(float)'
- Compute the arcus cosinus value in the range 0 to pi.
- `float atan(float)'
- Compute the arcus tangens value in the range -pi/2 to pi/2.
- `float atan2(float x, float y)'
- Compute the argument (phase) of a rectangular coordinate in
the range -pi to pi.
- `float exp(float)'
- Compute the exponential function using the natural logarithm e as base.
- `float log(float)'
- Compute the natural logaritm.
- `float sinh(float)'
- Compute the sinus hyperbolicus value.
- `float cosh(float)'
- Compute the cosinus hyperbolicus value.
- `float tanh(float)'
- Compute the tangens hyperbolicus value.
- `float asinh(float)'
- Compute the arcus sinus hyperbolicus value.
- `float acosh(float)'
- Compute the arcus cosinus hyperbolicus value.
- `float atanh(float)'
- Compute the arcus tangens hyperbolicus value.
- `float abs(float)'
- Compute the absolute value of the given argument.
- `float fact(float)'
- Compute the factorial (gamma function) of the given argument.
- `float sqrt(float)'
- Compute the square root of the given argument.
This document was generated
by Hekay Permer on April, 20 2005
using texi2html