huge commit
- worked on about everything - grid walker using plugable modules - wifi models - new distributions - worked on geometric data-structures - added typesafe timestamps - worked on grid-building - added sensor-classes - added sensor analysis (step-detection, turn-detection) - offline data reader - many test-cases
This commit is contained in:
@@ -28,6 +28,19 @@ TEST(Angle, calc) {
|
||||
|
||||
}
|
||||
|
||||
TEST(Angle, signedDiff) {
|
||||
|
||||
const float d = 0.00001f;
|
||||
ASSERT_NEAR(+M_PI/2, Angle::getSignedDiffRAD_2PI(0, M_PI/2), d); // CCW
|
||||
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI/2, 0), d); // CW -> negative
|
||||
|
||||
ASSERT_NEAR(+M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI/2, M_PI), d); // CCW
|
||||
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(M_PI, M_PI/2), d); // CW -> negative
|
||||
|
||||
ASSERT_NEAR(-M_PI/2, Angle::getSignedDiffRAD_2PI(0, M_PI*1.5), d); // CW -> negative
|
||||
|
||||
}
|
||||
|
||||
TEST(Angle, diff) {
|
||||
|
||||
const float r = Angle::getRAD_2PI(0,0, +1,0); // to the right
|
||||
|
||||
Reference in New Issue
Block a user