Esempio n. 1
0
/**
    Rotates this vector with the opposite angle of the
    specified transform.
*/
void Vect2D::subtractRotation(Transform2D& xform) {
    // note that sin(-x) == -sin(x) and cos(-x) == cos(x)
    rotateXY(xform.getCosAngleXY(), -xform.getSinAngleXY());
}
Esempio n. 2
0
/**
    Rotates this vector with the angle of the specified
    transform.
*/
void Vect2D::addRotation(Transform2D& xform) {
    rotateXY(xform.getCosAngleXY(), xform.getSinAngleXY());
}