isAngleInsideRadiansSelection function
bool
isAngleInsideRadiansSelection(
- double angle,
- double start,
- double sweep,
- ClockIncrementTimeFormat clockIncrementTimeFormat,
Implementation
bool isAngleInsideRadiansSelection(
double angle,
double start,
double sweep,
ClockIncrementTimeFormat clockIncrementTimeFormat,
) {
var normalized = angle > pi / 2
? clockIncrementTimeFormat.value * pi / 2 - angle
: pi / 2 - angle;
var end = (start + sweep) % (2 * pi);
return end > start
? normalized > start && normalized < end
: normalized > start || normalized < end;
}