diff --git a/src/math/p5.Vector.js b/src/math/p5.Vector.js index 7a0c6fbb89..574bc5c74e 100644 --- a/src/math/p5.Vector.js +++ b/src/math/p5.Vector.js @@ -2303,11 +2303,15 @@ p5.Vector.lerp = function lerp(v1, v2, amt, target) { return target; }; +/** + * Calculates the magnitude (length) of the vector and returns the result as + * a float (this is simply the equation sqrt(x\*x + y\*y + z\*z).) + */ /** * @method mag + * @static * @param {p5.Vector} vecT the vector to return the magnitude of * @return {Number} the magnitude of vecT - * @static */ p5.Vector.mag = function mag(vecT) { const x = vecT.x,