From 3543f074f4daa5bd3078ad2f2c8483815fd6f65a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 12 Jul 2022 16:06:13 -0700 Subject: [PATCH] fix erroneous Normalize --- src/Math/MathHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Math/MathHelper.cs b/src/Math/MathHelper.cs index 5d582f25..67f7d0a7 100644 --- a/src/Math/MathHelper.cs +++ b/src/Math/MathHelper.cs @@ -341,7 +341,7 @@ namespace MoonWorks.Math /// public static float Normalize(short value, short min, short max, short newMin, short newMax) { - return ((value - min) * (newMax - newMin)) / (max - min) + newMin; + return ((float) (value - min) * (newMax - newMin)) / (max - min) + newMin; } ///