Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Rotiraj(const Tacka &t, double ugao) {
- double bX = t.first + (B.first - t.first) * std::cos(ugao) - (B.second - t.second) * std::sin(ugao);
- double bY = t.second + (B.first - t.first) * std::sin(ugao) + (B.second - t.second) * std::cos(ugao);
- A.first = t.first + (A.first - t.first) * std::cos(ugao) - (A.second - t.second) * std::sin(ugao);
- A.second = t.second + (A.first - t.first) * std::sin(ugao) + (A.second - t.second) * std::cos(ugao);
- B.first = bX;
- B.second = bY;
- C.first = t.first + (C.first - t.first) * std::cos(ugao) - (C.second - t.second) * std::sin(ugao);
- C.second = t.second + (C.first - t.first) * std::sin(ugao) + (C.second - t.second) * std::cos(ugao);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement