diff --git a/src/common/tvgMath.cpp b/src/common/tvgMath.cpp index d2cb39b5..327c68b5 100644 --- a/src/common/tvgMath.cpp +++ b/src/common/tvgMath.cpp @@ -374,9 +374,7 @@ float Bezier::angle(float t) const uint8_t lerp(const uint8_t &start, const uint8_t &end, float t) { - auto result = static_cast(start + (end - start) * t); - tvg::clamp(result, 0, 255); - return static_cast(result); + return static_cast(tvg::clamp(static_cast(start + (end - start) * t), 0, 255)); } }