Benutzer-Werkzeuge

Webseiten-Werkzeuge


lcd4linux:plugin_math

Mathematical functions plugin

This plugin provides some basic mathematical functions. This plugin will always be linked statically into LCD4Linux, and therefore does not follow the plugin_name::function scheme.


Constants

The Plugin defines the following variables:

Pi3.14159….
e2.718…

Functions:

sqrt(x)square root
exp(x)base-e exponential function
ln(x)natural logarithmic
log(x)base-10 logarithmic
sin(x)sine function
cos(x)cosine function
tan(x)tangent function
ceil(x)round up to next integer
floor(x)round down to next integer
min(a,b)minimum of a and b
max(a,b)maximum of a and b
decode(index,…)return parameter specified by index

decode() examples

expressionresult
decode(-1,'a','b')!| |decode(0,'a','b')|'a'| |decode(1,'a','b')|'b'| |decode(2,'a','b')|!
decode(3,'a','b','c','d','e','f')'d'

lcd4linux/plugin_math.txt · Zuletzt geändert: 2022/02/15 20:09 von 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki