squaredLength static method

double squaredLength(
  1. Vec2D a
)

Implementation

static double squaredLength(Vec2D a) {
  double x = a[0];
  double y = a[1];
  return x * x + y * y;
}