]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/src-isv/Arithmetic.mediawiki
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.runtime / src-isv / Arithmetic.mediawiki
diff --git a/bundles/org.simantics.scl.runtime/src-isv/Arithmetic.mediawiki b/bundles/org.simantics.scl.runtime/src-isv/Arithmetic.mediawiki
new file mode 100644 (file)
index 0000000..3613bf1
--- /dev/null
@@ -0,0 +1,63 @@
+== Arithmetic ==\r
+\r
+Writing mathematical formulas in SCL is mostly unsurprising.\r
+<pre>0.5*m*v^2 + m*g*h</pre>\r
+\r
+When applying functions, parentheses are not needed around the \r
+parameters and multiple parameters are separated by whitespace:\r
+<pre>sin x + sin y</pre>\r
+<pre>atan2 y x</pre>\r
+\r
+The following mathematical functions are provided in the standard library:\r
+{|\r
+| ^ \r
+| exponentiation\r
+|-\r
+| *, / \r
+| multiplication and division\r
+|-\r
+| div,mod\r
+| integer division and remainder\r
+|-\r
+| +, - \r
+| addition and substraction\r
+|-\r
+| ==, != \r
+| equality and inequality\r
+|-\r
+| <, <=, >=, > \r
+| comparison\r
+|-\r
+| abs \r
+| absolute value\r
+|-\r
+| min, max \r
+| minimum and maximum\r
+|-\r
+| pi \r
+| constant pi\r
+|-\r
+| exp \r
+| exponential function\r
+|-\r
+| log \r
+| natural logarithm\r
+|-\r
+| sqrt \r
+| square root\r
+|-\r
+| sin, cos, tan \r
+| trigonometric functions\r
+|-\r
+| asin, acos, atan \r
+| inverse trigonometric functions\r
+|-\r
+| atan2 \r
+| angle of a point\r
+|-\r
+| sinh, cosh, tanh \r
+| hyberbolic functions\r
+|-\r
+| floor, ceil \r
+| rounding down and up to integer\r
+|}\r