From 73cc70358020538b13f2d5cf4e81426b13bbb85a Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Sun, 24 Jan 2021 22:08:56 +0100 Subject: ... --- content/fate_v1/computations/maths/_index.md | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 content/fate_v1/computations/maths/_index.md (limited to 'content/fate_v1/computations/maths/_index.md') diff --git a/content/fate_v1/computations/maths/_index.md b/content/fate_v1/computations/maths/_index.md new file mode 100644 index 0000000..ef0783b --- /dev/null +++ b/content/fate_v1/computations/maths/_index.md @@ -0,0 +1,58 @@ +--- +title: Mathematics +weight: 1 +--- + +All operands must be of the same type, which is also the type returned by the +operation. + +### Addition +{{< fatecode >}}(+ [N0 = NUMBER] ... [NN = NUMBER]){{< /fatecode >}} + +Standard addition (minimum of 2 arguments). + +### Substraction +{{< fatecode >}}(- [N0 = NUMBER] ... [NN = NUMBER]){{< /fatecode >}} + +Standard substraction (minimum of 2 arguments). + +### Multiplication +{{< fatecode >}}(* [N0 = NUMBER] ... [NN = NUMBER]){{< /fatecode >}} + +Standard multiplication (minimum of 2 arguments). + +### Division +{{< fatecode >}}(/ [N0 = NUMBER] [N1 = NUMBER]){{< /fatecode >}} + +Standard division. Note that a division on integers is indeed an integer +division. + +### Exponent +{{< fatecode >}}(^ [N0 = NUMBER] [N1 = NUMBER]){{< /fatecode >}} + +Standard exponentiation. + +### Modulo +{{< fatecode >}}(% [I0 = INT] [I1 = INT]){{< /fatecode >}} + +Standard modulo operation. + +### Minimum +{{< fatecode >}}(min [N0 = NUMBER] ... [NN = NUMBER]){{< /fatecode >}} + +Lowest value among the operands (minimum of 2 arguments). + +### Maximum +{{< fatecode >}}(max [N0 = NUMBER] ... [NN = NUMBER]){{< /fatecode >}} + +Highest value among the operands (minimum of 2 arguments). + +### Clamp +{{< fatecode >}}(clamp [N0 = NUMBER] [N1 = NUMBER] [N2 = NUMBER]){{< /fatecode >}} + +Equivalent to `(max N0 (min N1 N2))`. + +### Absolute +{{< fatecode >}}(abs [NUMBER]){{< /fatecode >}} + +Positive value of `[NUMBER]`. -- cgit v1.2.3-70-g09d2