mix function Null safety

double mix(
  1. double min,
  2. double max,
  3. double a
)

Interpolate between min and max with the amount of a using a linear interpolation. The computation is equivalent to the GLSL function mix.

Implementation

double mix(double min, double max, double a) => min + a * (max - min);