Skip to content

Commit b1c53c8

Browse files
committed
making some functions constexpr
1 parent a135677 commit b1c53c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/nbl/core/math/floatutil.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ NBL_FORCE_INLINE matrix4SIMD ROUNDING_ERROR<matrix4SIMD>();
4949
#endif
5050
//! Constant for PI.
5151
template<typename T>
52-
NBL_FORCE_INLINE T PI()
52+
NBL_FORCE_INLINE constexpr T PI()
5353
{
5454
return T(3.14159265358979323846);
5555
}
5656

5757
//! Constant for reciprocal of PI.
5858
template<typename T>
59-
NBL_FORCE_INLINE T RECIPROCAL_PI()
59+
NBL_FORCE_INLINE constexpr T RECIPROCAL_PI()
6060
{
6161
return T(1.0) / PI<T>();
6262
}
6363

6464
//! Constant for half of PI.
6565
template<typename T>
66-
NBL_FORCE_INLINE T HALF_PI()
66+
NBL_FORCE_INLINE constexpr T HALF_PI()
6767
{
6868
return PI<T>() * T(0.5);
6969
}

0 commit comments

Comments
 (0)