initial version

This commit is contained in:
2016-01-21 11:10:55 +01:00
parent 8818a9b216
commit a7dc0cabbb
21 changed files with 1397 additions and 0 deletions

21
tests/geo/TestAngle.cpp Executable file
View 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