length function

double length(
  1. List<double> a
)

Calculates the length of a vec4

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

Implementation

double length(List<double> a) {
  final x = a[0];
  final y = a[1];
  final z = a[2];
  final w = a[3];
  return hypot([x, y, z, w]);
}