squaredLength function

double squaredLength(
  1. List<double> a
)

Calculates the squared length of a vec3

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

Implementation

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