squaredLength function

List<double> squaredLength(
  1. dynamic a
)

Calculates the squared length of a vec2

@param {ReadonlyVec2} a vector to calculate squared length of @returns {Number} squared length of a

Implementation

List<double> squaredLength(a) {
  var x = a[0], y = a[1];
  return x * x + y * y;
}