Example #1
0
void checkDotProductInvariance(const Transform & trans, const Wrench & w, const Twist & twist)
{
    double power = w.dot(twist);
    double powerCheck = twist.dot(w);
    double powerCheck2 = (trans*w).dot(trans*twist);
    double powerCheck3 = (trans*twist).dot(trans*w);

    ASSERT_EQUAL_DOUBLE(power,powerCheck);
    ASSERT_EQUAL_DOUBLE(power,powerCheck2);
    ASSERT_EQUAL_DOUBLE(power,powerCheck3);

}