sweepAngleToActualValue static method

double sweepAngleToActualValue({
  1. required double sweepAngle,
  2. required double maxValue,
  3. required double maxDegrees,
  4. required double minValue,
})

Convert the sweepAngle to ActualValue.

Implementation

static double sweepAngleToActualValue(
    {required double sweepAngle,
    required double maxValue,
    required double maxDegrees,
    required double minValue}) {
  // final ratio = sweepAngle / maxDegrees;
  // return ratio * maxValue;

  return radiansToDegrees(sweepAngle) * ((maxValue - minValue) / maxDegrees) +
      minValue;
}