galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Math.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_MATH_MATH_HPP_
9#define GALAXY_MATH_MATH_HPP_
10
12
13namespace galaxy
14{
15 namespace math
16 {
27 template<meta::is_arithmetic Arithmetic>
28 [[nodiscard]]
29 inline float constexpr normalize(const Arithmetic val, const Arithmetic max) noexcept
30 {
31 return static_cast<float>(val) / static_cast<float>(max);
32 }
33 } // namespace math
34} // namespace galaxy
35
36#endif
float constexpr normalize(const Arithmetic val, const Arithmetic max) noexcept
Calc normalized value from range.
Definition Math.hpp:29
Timer.hpp galaxy.
Definition Timer.cpp:18