This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| new:math [2019/04/20 16:15] – korshun | new:math [2019/04/20 22:25] (current) – [Other useful functions] korshun | ||
|---|---|---|---|
| Line 48: | Line 48: | ||
| // wrap around | // wrap around | ||
| selected_item = mod(selected_item, | selected_item = mod(selected_item, | ||
| - | </ | ||
| - | |||
| - | === lerp === | ||
| - | |||
| - | '' | ||
| - | |||
| - | Performs [[wp> | ||
| - | |||
| - | Simple animation of movement between two points: | ||
| - | < | ||
| - | for (int time = 0; time < 1.0; time += 0.05) | ||
| - | { | ||
| - | int x = lerp(x1, x2, time); | ||
| - | int y = lerp(y1, y2, time); | ||
| - | DrawSomething(x, | ||
| - | Delay(1); | ||
| - | } | ||
| </ | </ | ||