28 double rgb[3] = {0, 0, 0};
29 double hsv[3] = {0, 0, 0};
32 CU_ASSERT_DOUBLE_EQUAL(hsv[0], 0, DBL_EPSILON);
33 CU_ASSERT_DOUBLE_EQUAL(hsv[1], 0, DBL_EPSILON);
34 CU_ASSERT_DOUBLE_EQUAL(hsv[2], 0, DBL_EPSILON);
40 CU_ASSERT_DOUBLE_EQUAL(hsv[0], 2/3., DBL_EPSILON);
41 CU_ASSERT_DOUBLE_EQUAL(hsv[1], 1, DBL_EPSILON);
42 CU_ASSERT_DOUBLE_EQUAL(hsv[2], 1, DBL_EPSILON);
48 CU_ASSERT_DOUBLE_EQUAL(hsv[0], 7/12., DBL_EPSILON);
49 CU_ASSERT_DOUBLE_EQUAL(hsv[1], 1, DBL_EPSILON);
50 CU_ASSERT_DOUBLE_EQUAL(hsv[2], 0.5, DBL_EPSILON);
56 CU_ASSERT_DOUBLE_EQUAL(hsv[0], 1/3., DBL_EPSILON);
57 CU_ASSERT_DOUBLE_EQUAL(hsv[1], 0.5, DBL_EPSILON);
58 CU_ASSERT_DOUBLE_EQUAL(hsv[2], 1, DBL_EPSILON);
64 CU_ASSERT_DOUBLE_EQUAL(hsv[0], 0.5, DBL_EPSILON);
65 CU_ASSERT_DOUBLE_EQUAL(hsv[1], 0.5, DBL_EPSILON);
66 CU_ASSERT_DOUBLE_EQUAL(hsv[2], 0.4, DBL_EPSILON);
rt_errorstate rt_util_rgb_to_hsv(double rgb[3], double hsv[3])