Matrix4.diagonal3 constructor

Matrix4.diagonal3(Vector3 scale)

Scale matrix.

Implementation

factory Matrix4.diagonal3(Vector3 scale) {
  final Matrix4 m = new Matrix4.zero();
  final Float32List mStorage = m._m4storage;
  final Float32List scaleStorage = scale._v3storage;
  mStorage[15] = 1.0;
  mStorage[10] = scaleStorage[2];
  mStorage[5] = scaleStorage[1];
  mStorage[0] = scaleStorage[0];
  return m;
}