From 457569e8accc0feba444456fbd8410a8721a4a76 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Sun, 11 Oct 2026 01:40:23 +0200 Subject: [PATCH] fix: keep quantize() in its own value type The S5276 change cast the result of the generic quantize() to unsigned int, which truncated float/double callers (shadow angle slider, editor rotation snapping, AI speed control steps) and broke negative values. --- utilities/utilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/utilities.h b/utilities/utilities.h index 78107583..5392ba6c 100644 --- a/utilities/utilities.h +++ b/utilities/utilities.h @@ -314,7 +314,7 @@ template T clamp_power_of_two(T Value, T const Min = T(1), T const template Type_ quantize(Type_ const Value, Type_ const Step) { - return static_cast(Step * std::round(Value / Step)); + return static_cast(Step * std::round(Value / Step)); } template T min_speed(T const Left, T const Right)