1518 memset(&p1, 0,
sizeof(
POINT3D));
1519 memset(&p2, 0,
sizeof(
POINT3D));
1520 memset(&n, 0,
sizeof(
POINT3D));
1527 CU_ASSERT_DOUBLE_EQUAL(n.
x, 0.707107, 0.00001);
1529 angle = 2*M_PI/400000000;
1532 CU_ASSERT_DOUBLE_EQUAL(n.
x, 0.999999999999999888978, 0.0000000000000001);
1533 CU_ASSERT_DOUBLE_EQUAL(n.
y, 1.57079632679489654446e-08, 0.0000000000000001);
1538 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...