Updated Modulo.md (markdown)
commited
commit
d85cc199d725fe358561473fbe99b5b087d5c89f
... | ... | @@ -1,3 +1,34 @@ |
1 |
Computes the division remainder. |
|
1 |
Outputs the remainder of a division calculation. |
|
2 | 2 | |
3 | [[/uploads/Modulo.png]] |
|
... | ... | \ No newline at end of file |
0 | [[/uploads/Modulo.png]] |
|
1 | ||
2 | Inputs: |
|
3 | ||
4 | * A: The value to be divided. |
|
5 | * B: Value to divide A by. |
|
6 | ||
7 | Output: |
|
8 | ||
9 | * Mod: The remainder of the division calculation A/B. |
|
10 | ||
11 | ## Notes |
|
12 | * If the calculation doesn't have a remainder, the Modulo will be **0**. |
|
13 | ||
14 | ## Examples |
|
15 | Division: |
|
16 | ||
17 | * 5/2 = 2 |
|
18 | * 10/5 = 2 |
|
19 | ||
20 | Modulo: |
|
21 | ||
22 | * 5/2 = 1 |
|
23 | * 10/5 = 0 |
|
24 | ||
25 | Uses: |
|
26 | ||
27 | * Do every X frames: |
|
28 | * With the accompany of the [[Current Frame]] block in input A, you can specify an event that takes places every X frames. For example, because 60 frames is 1 second, input B can be 60 and, if the modulo is equal to 0, your event will be executed every 1 second. |
|
29 | ||
30 | [[/uploads/20210118_130457.png]] |
|
31 | _Image source:_ [[How do I execute a script every second?]] |