restingRotationFor method

double restingRotationFor(
  1. int index,
  2. double fraction,
  3. double pointerAngle
)

A rotation in [0, 2π) that puts the point at fraction of slice index under the pointer.

Implementation

double restingRotationFor(int index, double fraction, double pointerAngle) {
  final double u = offsets[index] + fraction * sweeps[index];
  return (pointerAngle + pi / 2 - u) % (2 * pi);
}