== Arithmetic == Writing mathematical formulas in SCL is mostly unsurprising.
0.5*m*v^2 + m*g*h
When applying functions, parentheses are not needed around the parameters and multiple parameters are separated by whitespace:
sin x + sin y
atan2 y x
The following mathematical functions are provided in the standard library: {| | ^ | exponentiation |- | *, / | multiplication and division |- | div,mod | integer division and remainder |- | +, - | addition and substraction |- | ==, != | equality and inequality |- | <, <=, >=, > | comparison |- | abs | absolute value |- | min, max | minimum and maximum |- | pi | constant pi |- | exp | exponential function |- | log | natural logarithm |- | sqrt | square root |- | sin, cos, tan | trigonometric functions |- | asin, acos, atan | inverse trigonometric functions |- | atan2 | angle of a point |- | sinh, cosh, tanh | hyberbolic functions |- | floor, ceil | rounding down and up to integer |}