update stuff

This commit is contained in:
2024-05-07 02:12:17 +03:00
parent 526e4de812
commit 503114e4b8
2 changed files with 8 additions and 9 deletions

View File

@@ -1,19 +1,20 @@
//
// Created by vlad on 11/6/23.
//
#define _USE_MATH_DEFINES
#include "uml/angles.h"
#include <cmath>
#include <numbers>
namespace uml::angles
{
float RadToDeg(float rads)
{
return rads * 180.f / static_cast<float>(M_PI);
return rads * 180.f / std::numbers::pi_v<float>;
}
float DegToRad(float degrees)
{
return degrees * static_cast<float>(M_PI) / 180.f;
return degrees * std::numbers::pi_v<float> / 180.f;
}
}