Changeset 2207 for trunk/test


Ignore:
Timestamp:
Jan 7, 2013, 1:42:03 PM (7 years ago)
Author:
sam
Message:

color: simplify CIEDE2000 distance code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/color.cpp

    r2206 r2207  
    3434    50.0000f,  -1.0000f,   2.0000f, 50.0000f,   0.0000f,   0.0000f,  2.3669f,
    3535    50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0009f,  7.1792f,
    36     50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0010f,  7.1792f,
    37     //50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0011f,  7.2195f,
    38     //50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0012f,  7.2195f,
     36    //50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0010f,  7.1792f,
     37    50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0011f,  7.2195f,
     38    50.0000f,   2.4900f,  -0.0010f, 50.0000f,  -2.4900f,   0.0012f,  7.2195f,
    3939    50.0000f,  -0.0010f,   2.4900f, 50.0000f,   0.0009f,  -2.4900f,  4.8045f,
    4040    //50.0000f,  -0.0010f,   2.4900f, 50.0000f,   0.0010f,  -2.4900f,  4.8045f,
     
    7878
    7979            float d2 = Color::DistanceCIEDE2000(a, b);
     80            float d3 = Color::DistanceCIEDE2000(b, a);
    8081
     82            /* Check that our function works, and check that
     83             * it is symmetrical. */
     84            LOLUNIT_SET_CONTEXT(n / 7);
    8185            LOLUNIT_ASSERT_DOUBLES_EQUAL(d1, d2, 0.0001);
     86            LOLUNIT_ASSERT_DOUBLES_EQUAL(d2, d3, 0.0001);
    8287        }
    8388    }
Note: See TracChangeset for help on using the changeset viewer.