
L-VIS User Manual
165
LOYTEC
Version 6.2
LOYTEC electronics GmbH
Function
Return Value
add(v1,v2)
v1 + v2
sub(v1,v2)
v1 - v2
mul(v1,v2)
v1 * v2
div(v,d)
v / d
mod(v,m)
Returns the remainder of dividing v by m, where v and m should be integer
values. Fractional values will be rounded to the nearest integer
automatically
max(v1,...)
Returns the maximum of all values on the value stack
min(v1,...)
Returns the minimum of all values on the value stack
avg(v1,...)
Returns the arithmetic mean value of all values on the stack
log(v)
Returns the natural logarithm of v
log2(v)
Returns the base 2 logarithm of v
log10(v)
Returns the base 10 logarithm of v
exp(v)
Returns the value of e (the base of natural logarithms) raised to the power
of v
exp2(v)
Returns the value of 2 raised to the power of v
exp10(v)
Returns the value of 10 raised to the power of v
sqrt(v)
Returns the non-negative square root of v
pow(v,exp)
Returns the value of v raised to the power of exp
round(v)
Round v to the nearest integer
floor(v)
Round v down to the nearest integer
ceil(v)
Round v up to the nearest integer
sum(v1,...)
Returns the sum of all values on the stack
and(b1,b2)
logical AND of the Boolean values b1 and b2
(b1&&b2)
or(b1,b2)
logical OR of the Boolean values b1 and b2
(b1||b2)
xor(b1,b2)
logical exclusive OR of the values b1 and b2
(b1^b2)
not(b)
logical inverse of the Boolean value b (!b)
lt(v1,v2)
returns 1 if v1 is lower than v2, else returns 0
(v1 < v2)
le(v1,v2)
returns 1 if v1 is lower or equal v2, else 0
(v1 <= v2)
eq(v1,v2)
returns 1 if v1 equals v2, else 0
(v1 = v2)
ge(v1,v2)
returns 1 if v1 is greater or equal v2, else 0
(v1 >= v2)
gt(v1,v2)
returns 1 if v1 is greater than v2, else 0
(v1 > v2)
if(b,vt,vf)
returns vt if b is true, else returns vf
(b ? vt : vf)
encode(b1,...)
Reads all values from the stack, converts them to Boolean values and
encodes them into an integer value, where the first value is used as the LSB
and the last value as the MSB.
sin(v1)
Returns the sine of v1, where v1 is given in radians
cos(v1)
Returns the cosine of v1, where v1 is given in radians
tan(v1)
Returns the tangent of v1, where v1 is given in radians
sinh(v1)
Returns the hyperbolic sine of v1, which is defined mathematically as
(exp(v1) - exp(-v1)) / 2
cosh(v1)
Returns the hyperbolic cosine of v1, which is defined mathematically as
(exp(v1) + exp(-v1)) / 2
tanh(v1)
Returns the hyperbolic tangent of v1, which is defined mathematically as
sinh(v1) / cosh(v1)
asin(v1)
Returns the arc sine of v1; that is the value whose sine is v1
acos(v1)
Returns the arc cosine of v1; that is the value (in rad) whose cosine is v1
atan(v1)
Returns the arc tangent of v1; that is the value (in rad) whose tangent is v1