We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a135677 commit b1c53c8Copy full SHA for b1c53c8
include/nbl/core/math/floatutil.h
@@ -49,21 +49,21 @@ NBL_FORCE_INLINE matrix4SIMD ROUNDING_ERROR<matrix4SIMD>();
49
#endif
50
//! Constant for PI.
51
template<typename T>
52
-NBL_FORCE_INLINE T PI()
+NBL_FORCE_INLINE constexpr T PI()
53
{
54
return T(3.14159265358979323846);
55
}
56
57
//! Constant for reciprocal of PI.
58
59
-NBL_FORCE_INLINE T RECIPROCAL_PI()
+NBL_FORCE_INLINE constexpr T RECIPROCAL_PI()
60
61
return T(1.0) / PI<T>();
62
63
64
//! Constant for half of PI.
65
66
-NBL_FORCE_INLINE T HALF_PI()
+NBL_FORCE_INLINE constexpr T HALF_PI()
67
68
return PI<T>() * T(0.5);
69
0 commit comments