initial version
This commit is contained in:
21
tests/geo/TestAngle.cpp
Executable file
21
tests/geo/TestAngle.cpp
Executable file
@@ -0,0 +1,21 @@
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
#include "../Tests.h"
|
||||
|
||||
#include "../../geo/Angle.h"
|
||||
|
||||
TEST(Angle, calc) {
|
||||
|
||||
ASSERT_EQ(0, Angle::getDEG(0,0, +1,0)); // to the right
|
||||
ASSERT_EQ(90, Angle::getDEG(0,0, 0,+1)); // upwards
|
||||
ASSERT_EQ(180, Angle::getDEG(0,0, -1,0)); // to the left
|
||||
ASSERT_EQ(270, Angle::getDEG(0,0, 0,-1)); // downwards
|
||||
|
||||
ASSERT_EQ(45, Angle::getDEG(0,0, +1,+1)); // to the upper right
|
||||
ASSERT_EQ(135, Angle::getDEG(0,0, -1,+1)); // to the upper left
|
||||
ASSERT_EQ(225, Angle::getDEG(0,0, -1,-1)); // to the lower left
|
||||
ASSERT_EQ(315, Angle::getDEG(0,0, +1,-1)); // to the lower right
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user