core/spin_calculations library
Classes
- SpinResult
- Holds the calculation results for a wheel spin animation.
Functions
-
determineSegment(
List< WheelSegment> segments, double endRotation) → int -
Determines which segment index is at the top position based on the final
endRotation. -
spinWheel(
double startRotation, List< WheelSegment> segments) → SpinResult -
Calculates the target
endrotation for a spin based on weighted probabilities.