MatrixD.scale constructor

MatrixD.scale(
  1. double x,
  2. double y,
  3. double z
)

Returns a scaling matrix for the given x, y, z factors.

Implementation

factory MatrixD.scale(double x, double y, double z) => .mat4(
  x, 0, 0, 0,
  0, y, 0, 0,
  0, 0, z, 0,
  0, 0, 0, 1,
);