mirror of
https://github.com/slendidev/smath.git
synced 2026-03-17 02:26:50 +02:00
This is done in preparation for optional interop headers for different libraries. Signed-off-by: Slendi <slendi@socopon.com>
19 lines
358 B
C++
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);
|
|
}
|