mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
initial commit
This commit is contained in:
18
source/angles.cpp
Normal file
18
source/angles.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by vlad on 11/6/23.
|
||||
//
|
||||
#include "uml/angles.h"
|
||||
#include <cmath>
|
||||
|
||||
namespace uml::angles
|
||||
{
|
||||
float RadToDeg(float rads)
|
||||
{
|
||||
return rads * 180.f / static_cast<float>(M_PI);
|
||||
}
|
||||
|
||||
float DegToRad(float degrees)
|
||||
{
|
||||
return degrees * static_cast<float>(M_PI) / 180.f;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user