absolute method Null safety

Matrix2 absolute ()

Returns the component wise absolute value of this.

Implementation

Matrix2 absolute() {
  final r = Matrix2.zero();
  final rStorage = r._m2storage;
  rStorage[0] = _m2storage[0].abs();
  rStorage[1] = _m2storage[1].abs();
  rStorage[2] = _m2storage[2].abs();
  rStorage[3] = _m2storage[3].abs();
  return r;
}