calculation

All the functions in this chapter have one thing in common: They have a value-output, that means all you get from them is a number. Sounds boring, right? It isn't!

constrain()

constrain() can be used to avoid objects move out of the screen.


map()

The map()-function re-maps a number from one range to another.

pos = map(a, 0, 50, 0, width);

dist()

results matching ""

    No results matching ""