20 #ifndef ANTKEEPER_MATH_MAP_HPP
21 #define ANTKEEPER_MATH_MAP_HPP
37 [[nodiscard]] constexpr T
map(T x, T from_min, T from_max, T to_min, T to_max) noexcept
39 return to_min + (x - from_min) * (to_max - to_min) / (from_max - from_min);
Mathematical functions and data types.
constexpr T map(T x, T from_min, T from_max, T to_min, T to_max) noexcept
Remaps a number from one range to another.