1
0
mirror of https://github.com/slendidev/smath.git synced 2026-03-17 02:26:50 +02:00
Files
smath/tests/angles.cpp
Slendi 2a161e36ab Move smath.hpp to smath/smath.hpp
This is done in preparation for optional interop headers for different
libraries.

Signed-off-by: Slendi <slendi@socopon.com>
2026-03-12 00:40:20 +02:00

19 lines
358 B
C++

#include <gtest/gtest.h>
#include <smath/smath.hpp>
TEST(AngleReturnRadians, DegInput)
{
EXPECT_NEAR(smath::deg(180.0), std::numbers::pi, 1e-12);
}
TEST(AngleReturnRadians, RadInput)
{
EXPECT_DOUBLE_EQ(smath::rad(std::numbers::pi), std::numbers::pi);
}
TEST(AngleReturnRadians, TurnsInput)
{
EXPECT_NEAR(smath::turns(0.5), std::numbers::pi, 1e-12);
}