Add constexpr degrees to radians method
This commit is contained in:
@@ -21,6 +21,13 @@ namespace OpenVulkano::Math
|
||||
namespace Utils
|
||||
{
|
||||
using namespace glm;
|
||||
|
||||
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;
|
||||
return degree * CONVERSION;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T> using Matrix2_SIMD = glm::tmat2x2<T, glm::aligned>;
|
||||
|
||||
Reference in New Issue
Block a user