Advertisement
aed1oN

Misterija :D

Jun 1st, 2019
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. void Rotiraj(const Tacka &t, double ugao) {
  2.         double bX = t.first  + (B.first - t.first) * std::cos(ugao) - (B.second - t.second) * std::sin(ugao);
  3.         double bY = t.second + (B.first - t.first) * std::sin(ugao) + (B.second - t.second) * std::cos(ugao);
  4.         A.first  = t.first  + (A.first - t.first) * std::cos(ugao) - (A.second - t.second) * std::sin(ugao);
  5.         A.second = t.second + (A.first - t.first) * std::sin(ugao) + (A.second - t.second) * std::cos(ugao);
  6.         B.first  = bX;
  7.         B.second = bY;
  8.         C.first  = t.first  + (C.first - t.first) * std::cos(ugao) - (C.second - t.second) * std::sin(ugao);
  9.         C.second = t.second + (C.first - t.first) * std::sin(ugao) + (C.second - t.second) * std::cos(ugao);
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement