AP_Math: add another test for wrap_360_cd

This commit is contained in:
Peter Barker 2018-10-15 12:19:05 +11:00 committed by Andrew Tridgell
parent e0f63ca7f1
commit dc14d7bce4
1 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,7 @@ TEST(MathWrapTest, Angle360)
EXPECT_EQ(18000.f, wrap_360_cd(18000.f));
EXPECT_EQ(27000.f, wrap_360_cd(27000.f));
EXPECT_EQ(0.f, wrap_360_cd(36000.f));
EXPECT_EQ(5.f, wrap_360_cd(36005.f));
EXPECT_EQ(0.f, wrap_360_cd(72000.f));
EXPECT_EQ(0.f, wrap_360_cd(360000.f));
EXPECT_EQ(0.f, wrap_360_cd(720000.f));
@ -271,6 +272,7 @@ TEST(MathWrapTest, Angle360)
EXPECT_EQ(18000.f, wrap_360_cd(-18000.f));
EXPECT_EQ(9000.f, wrap_360_cd(-27000.f));
EXPECT_EQ(0.f, wrap_360_cd(-36000.f));
EXPECT_EQ(35995.0f,wrap_360_cd(-36005.f));
EXPECT_EQ(0.f, wrap_360_cd(-72000.f));
}