Rotation constructor

const Rotation({
  1. required Axis axis,
  2. int n = 1,
})

Creates an instance of Rotation class.

Implementation

const Rotation({
  required this.axis,
  int n = 1,
})  : n = (n >= 0 ? n : n >= -4 ? n + 4 : -n - 4) % 4;