Matrix4.inverted constructor
Constructs a matrix that is the inverse of other
.
Implementation
factory Matrix4.inverted(Matrix4 other) {
final Matrix4 r = new Matrix4.zero();
final double determinant = r.copyInverse(other);
if (determinant == 0.0) {
throw new ArgumentError.value(
other, 'other', 'Matrix cannot be inverted');
}
return r;
}