rotate method

void rotate(
  1. double angle
)

Applies a rotation transformation to this matrix object.

Implementation

void rotate(double angle) {
  final cos = math.cos(angle);
  final sin = math.sin(angle);

  var a1 = a * cos - b * sin;
  b = a * sin + b * cos;
  a = a1;

  var c1 = c * cos - d * sin;
  d = c * sin + d * cos;
  c = c1;

  var tx1 = tx * cos - ty * sin;
  ty = tx * sin + ty * cos;
  tx = tx1;
}