sumSquares property

N get sumSquares

Implementation

N get sumSquares {
  var length = this.length;
  if (length == 0) return castElement(0);

  var first = this.first;

  var total = first * first;

  for (var i = 1; i < length; ++i) {
    var n = this[i];
    total += n * n;
  }

  return castElement(total);
}