getMaxScaleOnAxis method Null safety

double getMaxScaleOnAxis()

Returns the max scale value of the 3 axes.

Implementation

double getMaxScaleOnAxis() {
  final scaleXSq = _m4storage[0] * _m4storage[0] +
      _m4storage[1] * _m4storage[1] +
      _m4storage[2] * _m4storage[2];
  final scaleYSq = _m4storage[4] * _m4storage[4] +
      _m4storage[5] * _m4storage[5] +
      _m4storage[6] * _m4storage[6];
  final scaleZSq = _m4storage[8] * _m4storage[8] +
      _m4storage[9] * _m4storage[9] +
      _m4storage[10] * _m4storage[10];
  return math.sqrt(math.max(scaleXSq, math.max(scaleYSq, scaleZSq)));
}