Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules2/gl-vec2/squaredLength.js
T

13 lines
269 B
JavaScript
Raw Normal View History

2026-09-10 15:40:10 +08:00
module.exports = squaredLength
/**
* Calculates the squared length of a vec2
*
* @param {vec2} a vector to calculate squared length of
* @returns {Number} squared length of a
*/
function squaredLength(a) {
var x = a[0],
y = a[1]
return x*x + y*y
}