Tworzę gierkę 2d i spotkałem się z funkcją:
const CVector inline Rotate(const float angle, const CVector& normal) const
{
const float cosine = cosf(angle);
const float sine = sinf(angle);
return CVector(*this * cosine + ((normal * *this) * (1.0f - cosine)) * normal + (*this ^ normal) * sine);
}
^ - wektor kartezjański
jaki musi być vektor normal dla grafiki 2d?
Z góry THNX