Skip to content

Commit

Permalink
fix map() UB
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthapz committed Oct 17, 2023
1 parent f40c130 commit 25f4b33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/stormkit/Core/Utils/Numerics.mpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ namespace stormkit::core {
const T& in_max,
const U& out_min,
const U& out_max) noexcept -> U {
return narrow<U>((x - in_min) * (out_max - out_min) / (in_min) + out_min);
return narrow<U>((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min);
}

/////////////////////////////////////
Expand Down

0 comments on commit 25f4b33

Please sign in to comment.