get method

double get(
  1. double contrastLevel
)

Returns the value at a given contrast level.

Implementation

double get(double contrastLevel) => contrastLevel <= -1.0
    ? low
    : contrastLevel < 0.0
    ? MathUtils.lerp(low, normal, (contrastLevel - -1.0) / 1.0)
    : contrastLevel < 0.5
    ? MathUtils.lerp(normal, medium, (contrastLevel - 0.0) / 0.5)
    : contrastLevel < 1.0
    ? MathUtils.lerp(medium, high, (contrastLevel - 0.5) / 0.5)
    : high;