use cpp20 numbers for pi
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
#include <glm/gtx/transform.hpp>
|
||||
#include <glm/gtx/io.hpp>
|
||||
#include <math.h>
|
||||
#include <numbers>
|
||||
|
||||
namespace OpenVulkano::Math
|
||||
{
|
||||
@@ -26,7 +26,7 @@ namespace OpenVulkano::Math
|
||||
template<typename T, typename = std::enable_if_t<std::is_floating_point_v<T>>>
|
||||
constexpr T Radians(T degree)
|
||||
{
|
||||
constexpr T CONVERSION = M_PI / 180.0;
|
||||
constexpr T CONVERSION = std::numbers::pi_v<T> / 180.0;
|
||||
return degree * CONVERSION;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user