mapValue method

double mapValue(
  1. double min,
  2. double max
)

Returns the animation value mapped to a range.

Example:

animation.mapValue(0.0, 100.0); // Maps 0.0-1.0 to 0.0-100.0

Implementation

double mapValue(double min, double max) {
  return (value * (max - min)) + min;
}