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.


The Plugin defines the following variables:

Pi3.14159….
e2.718…

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

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'

  • plugin_math.txt
  • Last modified: 2020/07/17 18:33
  • (external edit)