setRotationZ method

void setRotationZ(
  1. double angle
)

Set to a rotation of angle radians about +Z — the 2-D rotation.

Implementation

void setRotationZ(double angle) {
  final half = angle * 0.5;
  x = 0.0;
  y = 0.0;
  z = math.sin(half);
  w = math.cos(half);
}