Calculates the magnitude (length) of the vector.

Use mag() to calculate the magnitude of a 2D vector using components as in mag(x, y).

उदाहरण

सिंटैक्स

mag()
mag(vecT)

पैरामीटर्स

vecT
p5.Vector:

The vector to return the magnitude of

Returns

Number: magnitude of the vector.
This page is generated from the comments in src/math/p5.Vector.js . Please feel free to edit it and submit a pull request!

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