getRotation method Null safety

Matrix3 getRotation()

Returns the rotation matrix from this homogeneous transformation matrix.

Implementation

Matrix3 getRotation() {
  final r = Matrix3.zero();
  copyRotation(r);
  return r;
}