레퍼런스 limit()

limit()

Limits a vector's magnitude to a maximum value.

The static version of limit(), as in p5.Vector.limit(v, 5), returns a new p5.Vector object and doesn't change the original.

예제

구문

limit(max)

매개변수

max
Number: maximum magnitude for the vector.

관련 레퍼런스