lighterUnsafe static method

double lighterUnsafe(
  1. double tone,
  2. double ratio
)

Tone >= tone parameter that ensures ratio. 100 if ratio cannot be achieved.

This method is unsafe because the returned value is guaranteed to be in bounds, but, the in bounds return value may not reach the desired ratio.

Implementation

static double lighterUnsafe(double tone, double ratio) =>
    lighter(tone, ratio) ?? 100.0;