diff --git a/lerp.cpp b/lerp.cpp index 3dd57b3d..f930e5b8 100644 --- a/lerp.cpp +++ b/lerp.cpp @@ -61,6 +61,7 @@ lerp::cubic (double a, double b, double weight) { double lerp::quintic (double a, double b, double weight) { + CHECK (weight >= 0.0 && weight <= 1.0); double t = weight * weight * weight * (weight * (weight * 6.0 - 15.0) + 10.0); return a * (1.0 - t) + b * t; }