summaryrefslogtreecommitdiff
blob: ef0783b43dcfc6d445e584ba1f6b90f4ae043c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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]`.