You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
607 B

#include "test_macros.hpp"
#include <matrix/helper_functions.hpp>
using matrix::isEqual;
using matrix::isEqualF;
using matrix::Vector3f;
using matrix::wrap_pi;
int main()
{
TEST(fabs(wrap_pi(4.0) - (4.0 - 2*M_PI)) < 1e-5);
TEST(fabs(wrap_pi(-4.0) - (-4.0 + 2*M_PI)) < 1e-5);
TEST(fabs(wrap_pi(3.0) - (3.0)) < 1e-3);
wrap_pi(NAN);
Vector3f a(1, 2, 3);
Vector3f b(4, 5, 6);
a.T().print();
TEST(!isEqual(a, b));
TEST(isEqual(a, a));
TEST(isEqualF(1.0f, 1.0f));
TEST(!isEqualF(1.0f, 2.0f));
return 0;
}
/* vim: set et fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : */