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
11
#include "
galaxy/meta/Concepts.hpp
"
12
13
namespace
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
Concepts.hpp
galaxy::math::normalize
float constexpr normalize(const Arithmetic val, const Arithmetic max) noexcept
Calc normalized value from range.
Definition
Math.hpp:29
galaxy
Timer.hpp galaxy.
Definition
Timer.cpp:18
galaxy
src
galaxy
math
Math.hpp
Generated on Wed Aug 20 2025 08:06:51 for galaxy by
1.12.0