1501 memset(&p1, 0,
sizeof(
POINT3D));
1502 memset(&p2, 0,
sizeof(
POINT3D));
1503 memset(&n, 0,
sizeof(
POINT3D));
1510 CU_ASSERT_DOUBLE_EQUAL(n.
x, 0.707107, 0.00001);
1512 angle = 2*M_PI/400000000;
1515 CU_ASSERT_DOUBLE_EQUAL(n.
x, 0.999999999999999888978, 0.0000000000000001);
1516 CU_ASSERT_DOUBLE_EQUAL(n.
y, 1.57079632679489654446e-08, 0.0000000000000001);
1521 CU_ASSERT_DOUBLE_EQUAL(n.
x, 1.0, 0.00000001);
void vector_rotate(const POINT3D *v1, const POINT3D *v2, double angle, POINT3D *n)
Rotates v1 through an angle (in radians) within the plane defined by v1/v2, returns the rotated vecto...