Ignore:
Timestamp:
Aug 23, 2012, 4:05:03 PM (10 years ago)
Author:
sam
Message:

math: add dot() for quaternions, plus the relevant unit test.

File:
1 edited

Legend:

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

    r1341 r1796  
    7878
    7979        LOLUNIT_ASSERT_EQUAL(norm(a * d), norm(a) * norm(d));
     80    }
     81
     82    LOLUNIT_TEST(Dot)
     83    {
     84        quat a(-1.f, 2.f, -3.f, 4.f);
     85        quat b(8.f, 7.f, 6.f, 5.f);
     86
     87        LOLUNIT_ASSERT_EQUAL(dot(a, b), 8.f);
    8088    }
    8189
Note: See TracChangeset for help on using the changeset viewer.