Calculates the magnitude squared of a vector.
// Returns 25 (squared magnitude of vector (3, 4))const r2 = Chalkboard.vect.magsq(Chalkboard.vect.init(3, 4)); Copy
// Returns 25 (squared magnitude of vector (3, 4))const r2 = Chalkboard.vect.magsq(Chalkboard.vect.init(3, 4));
The vector
Calculates the magnitude squared of a vector.
Example