ALEOS AF API Reference Guide
- Apr 5, 2012
- Author: Sierra Wireless
This provides detailed API documentation of all the Lua modules in ALEOS AF.
Mathematical Functions.
This library is an interface to the standard C math library. It provides all its functions inside the table math.Type
Type
Returns the absolute value of
Returns the arc cosine of
Returns the arc sine of
Returns the arc tangent of
Returns the arc tangent of
(It also handles correctly the case of
Returns the smallest integer larger than or equal to
Returns the cosine of
Returns the hyperbolic cosine of
Returns the angle
Returns the value e^x.
Returns the largest integer smaller than or equal to
Returns the remainder of the division of
Returns
The value
Returns m2^e (
Returns the natural logarithm of
Returns the base-10 logarithm of
Returns the maximum value among its arguments.
Returns the minimum value among its arguments.
Returns two numbers, the integral part of
The value of pi.
Returns x^y.
(You can also use the expression
Returns the angle
This function is an interface to the simple pseudo-random generator
function
(No guarantees can be given for its statistical properties.) When called without arguments, returns a uniform pseudo-random real number in the range [0,1). When called with an integer number
Sets
Returns the sine of
Returns the hyperbolic sine of
Returns the square root of
(You can also use the expression
Returns the tangent of
Returns the hyperbolic tangent of
This library is an interface to the standard C math library. It provides all its functions inside the table math.
Type math
| math.abs(x) | Returns the absolute value of x. |
| math.acos(x) | Returns the arc cosine of x (in radians). |
| math.asin(x) | Returns the arc sine of x (in radians). |
| math.atan(x) | Returns the arc tangent of x (in radians). |
| math.atan2(y, x) | Returns the arc tangent of y/x (in radians), but uses the signs
of both parameters to find the quadrant of the result. |
| math.ceil(x) | Returns the smallest integer larger than or equal to x. |
| math.cos(x) | Returns the cosine of x (assumed to be in radians). |
| math.cosh(x) | Returns the hyperbolic cosine of x. |
| math.deg(x) | Returns the angle x (given in radians) in degrees. |
| math.exp(x) | Returns the value e^x. |
| math.floor(x) | Returns the largest integer smaller than or equal to x. |
| math.fmod(x, y) | Returns the remainder of the division of x by y that rounds the
quotient towards zero. |
| math.frexp(x) | Returns m and e such that x = m2^e, e is an integer and the
absolute value of m is in the range [0.5, 1) (or zero when x is zero). |
| math.huge | The value HUGE_VAL, a value larger than or equal to any other
numerical value. |
| math.ldexp(m, e) | Returns m2^e (e should be an integer). |
| math.log(x) | Returns the natural logarithm of x. |
| math.log10(x) | Returns the base-10 logarithm of x. |
| math.max(x) | Returns the maximum value among its arguments. |
| math.min(x) | Returns the minimum value among its arguments. |
| math.modf(x) | Returns two numbers, the integral part of x and the fractional part of
x. |
| math.pi | The value of pi. |
| math.pow(x, y) | Returns x^y. |
| math.rad(x) | Returns the angle x (given in degrees) in radians. |
| math.random(m, n) | This function is an interface to the simple pseudo-random generator
function rand provided by ANSI C. |
| math.randomseed(x) | Sets x as the "seed" for the pseudo-random generator: equal seeds
produce equal sequences of numbers. |
| math.sin(x) | Returns the sine of x (assumed to be in radians). |
| math.sinh(x) | Returns the hyperbolic sine of x. |
| math.sqrt(x) | Returns the square root of x. |
| math.tan(x) | Returns the tangent of x (assumed to be in radians). |
| math.tanh(x) | Returns the hyperbolic tangent of x. |
Type math
Field(s)
math.abs(x)
Returns the absolute value of x.
Parameter
-
x:
math.acos(x)
Returns the arc cosine of x (in radians).
Parameter
-
x:
math.asin(x)
Returns the arc sine of x (in radians).
Parameter
-
x:
math.atan(x)
Returns the arc tangent of x (in radians).
Parameter
-
x:
math.atan2(y, x)
Returns the arc tangent of y/x (in radians), but uses the signs
of both parameters to find the quadrant of the result.
(It also handles correctly the case of
x being zero.)
Parameters
-
y: -
x:
math.ceil(x)
Returns the smallest integer larger than or equal to x.
Parameter
-
x:
math.cos(x)
Returns the cosine of x (assumed to be in radians).
Parameter
-
x:
math.cosh(x)
Returns the hyperbolic cosine of x.
Parameter
-
x:
math.deg(x)
Returns the angle x (given in radians) in degrees.
Parameter
-
x:
math.exp(x)
Returns the value e^x.
Parameter
-
x:
math.floor(x)
Returns the largest integer smaller than or equal to x.
Parameter
-
x:
math.fmod(x, y)
Returns the remainder of the division of x by y that rounds the
quotient towards zero.
Parameters
-
x: -
y:
math.frexp(x)
Returns m and e such that x = m2^e, e is an integer and the
absolute value of m is in the range [0.5, 1) (or zero when x is zero).
Parameter
-
x:
math.huge
The value HUGE_VAL, a value larger than or equal to any other
numerical value.
math.ldexp(m, e)
Returns m2^e (e should be an integer).
Parameters
-
m: -
e:
math.log(x)
Returns the natural logarithm of x.
Parameter
-
x:
math.log10(x)
Returns the base-10 logarithm of x.
Parameter
-
x:
math.max(x)
Returns the maximum value among its arguments.
Parameter
-
x:
math.min(x)
Returns the minimum value among its arguments.
Parameter
-
x:
math.modf(x)
Returns two numbers, the integral part of x and the fractional part of
x.
Parameter
-
x:
math.pi
The value of pi.
math.pow(x, y)
Returns x^y.
(You can also use the expression
x^y to compute this
value.)
Parameters
-
x: -
y:
math.rad(x)
Returns the angle x (given in degrees) in radians.
Parameter
-
x:
math.random(m, n)
This function is an interface to the simple pseudo-random generator
function rand provided by ANSI C.
(No guarantees can be given for its statistical properties.) When called without arguments, returns a uniform pseudo-random real number in the range [0,1). When called with an integer number
m,
math.random returns a uniform pseudo-random integer in the range [1,
m]. When called with two integer numbers m and n, math.random
returns a uniform pseudo-random integer in the range [m, n].
Parameters
-
m: -
n:
math.randomseed(x)
Sets x as the "seed" for the pseudo-random generator: equal seeds
produce equal sequences of numbers.
Parameter
-
x:
math.sin(x)
Returns the sine of x (assumed to be in radians).
Parameter
-
x:
math.sinh(x)
Returns the hyperbolic sine of x.
Parameter
-
x:
math.sqrt(x)
Returns the square root of x.
(You can also use the expression
x^0.5
to compute this value.)
Parameter
-
x:
math.tan(x)
Returns the tangent of x (assumed to be in radians).
Parameter
-
x:
math.tanh(x)
Returns the hyperbolic tangent of x.
Parameter
-
x:
Comment
Forum