operator - method

Array operator -(
  1. List<double> b
)

Subtract two arrays

Examples

var n = Array([1, 2, 3]);
var n2 = Array([1, 2, 3]);

print(n - n2);

/* output:
Array([0, 0, 0])
*/

Implementation

Array operator -(List<double> b) {
  _checkArray(b);
  var c = Array.fixed(length);
  for (var i = 0; i < length; i++) {
    c[i] = this[i] - b[i];
  }
  return c;
}