Returns the length of a vector squared This is the same as vecLength but without the Math.sqrt step, thus avoiding an unnecessary calculation.
vecLength
Math.sqrt
Optional
If not passed, defaults to [0,0].
vector length squared
The scalar overload can avoid temporary tuple allocations in tight loops.
vecLengthSquare([0, 0], [4, 3]); // returns 25vecLengthSquare([4, 3]); // returns 25 Copy
vecLengthSquare([0, 0], [4, 3]); // returns 25vecLengthSquare([4, 3]); // returns 25
Returns the length of a vector squared This is the same as
vecLengthbut without theMath.sqrtstep, thus avoiding an unnecessary calculation.