rotateZ method

Vector3 rotateZ(
  1. double angle
)

Rotation of the coordinate frame by angle about the z axis (R₃).

Implementation

Vector3 rotateZ(double angle) {
  final c = math.cos(angle), s = math.sin(angle);
  return Vector3(c * x + s * y, -s * x + c * y, z);
}