restingRotationFor method
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);
}