actualValueToSweepAngle static method
Convert the actualValue
to sweepAngle.
Implementation
static double actualValueToSweepAngle({
required double actualValue,
required double maxValue,
required double maxDegrees,
double minValue = 0,
}) {
final ratio = (actualValue - minValue) / (maxValue - minValue);
return ratio * maxDegrees;
}