mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-11-08 14:19:20 +01:00
docs: Document mathematical functions
This commit is contained in:
parent
163c44aaf0
commit
748dfb0c3f
@ -621,6 +621,50 @@ All templates have the following functions available to them:
|
|||||||
*lt* _arg1_, _arg2_
|
*lt* _arg1_, _arg2_
|
||||||
Returns the boolean truth of _arg1_ < _arg2_.
|
Returns the boolean truth of _arg1_ < _arg2_.
|
||||||
|
|
||||||
|
*math.Add* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ + _arg2_ as an integer if both arguments are
|
||||||
|
integers, otherwise as a float.
|
||||||
|
|
||||||
|
*math.Sub* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ - _arg2_ as an integer if both arguments are
|
||||||
|
integers, otherwise as a float.
|
||||||
|
|
||||||
|
*math.Mul* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ \* _arg2_ as an integer if both arguments are
|
||||||
|
integers, otherwise as a float.
|
||||||
|
|
||||||
|
*math.Div* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ / _arg2_ as a float.
|
||||||
|
|
||||||
|
*math.Mod* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ % _arg2_ as an integer.
|
||||||
|
|
||||||
|
*math.Ceil* _arg_
|
||||||
|
Returns the least integer value greater than or equal to _arg_.
|
||||||
|
|
||||||
|
*math.Floor* _arg_
|
||||||
|
Returns the greatest integer value less than or equal to _arg_.
|
||||||
|
|
||||||
|
*math.Log* _arg_
|
||||||
|
Returns the natural logarithm of _arg_ as a float.
|
||||||
|
|
||||||
|
*math.Max* _arg1_, _arg2_
|
||||||
|
Returns the greater of _arg1_ and _arg2_ as an integer if both arguments are
|
||||||
|
integers, otherwise as a float.
|
||||||
|
|
||||||
|
*math.Min* _arg1_, _arg2_
|
||||||
|
Returns the lesser of _arg1_ and _arg2_ as an integer if both arguments are
|
||||||
|
integers, otherwise as a float.
|
||||||
|
|
||||||
|
*math.Pow* _arg1_, _arg2_
|
||||||
|
Returns _arg1_ ^ _arg2_ as a float.
|
||||||
|
|
||||||
|
*math.Round* _arg_
|
||||||
|
Returns the nearest integer to _arg_, rounding half away from zero.
|
||||||
|
|
||||||
|
*math.Sqrt* _arg_
|
||||||
|
Returns square root of _arg_ as a float.
|
||||||
|
|
||||||
*ne* _arg1_, _arg2_
|
*ne* _arg1_, _arg2_
|
||||||
Returns the boolean truth of _arg1_ != _arg2_.
|
Returns the boolean truth of _arg1_ != _arg2_.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user