scale method

Matrix4 scale(
  1. Vector3 v
)

Scales this matrix by the given 3D vector.

Implementation

Matrix4 scale(Vector3 v ) {
	final e = elements;
	final x = v.x, y = v.y, z = v.z;

	e[ 0 ] *= x; e[ 4 ] *= y; e[ 8 ] *= z;
	e[ 1 ] *= x; e[ 5 ] *= y; e[ 9 ] *= z;
	e[ 2 ] *= x; e[ 6 ] *= y; e[ 10 ] *= z;
	e[ 3 ] *= x; e[ 7 ] *= y; e[ 11 ] *= z;

	return this;
}