sumSquares property

int get sumSquares

Implementation

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

  var first = this.first;

  var total = first * first;

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

  return total;
}