Skip to content

Commit

Permalink
Make p5.Vector.mag() comments consistent with others
Browse files Browse the repository at this point in the history
  • Loading branch information
weslord committed Jan 17, 2021
1 parent 9688687 commit 18dbd51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/math/p5.Vector.js
Expand Up @@ -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,
Expand Down

0 comments on commit 18dbd51

Please sign in to comment.