संदर्भ normalize()

normalize()

Scales the components of a p5.Vector object so that its magnitude is 1.

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

उदाहरण

सिंटैक्स

normalize()
normalize(v, [target])

पैरामीटर्स

v
p5.Vector:

The vector to normalize

target
p5.Vector:

The vector to receive the result

Notice any errors or typos? Please let us know. Please feel free to edit src/math/p5.Vector.js and open a pull request!

संबंधित संदर्भ