Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float angle_ = angle * 0.0174532925; // Градусы->радианы
- Matrix<float> pos({{ posA.x },
- { posA.y }});
- Matrix<float> rotate({{ cos(angle_), -sin(angle_) },
- { sin(angle_), cos(angle_) }});
- Matrix<float> newpos = rotate * pos;
- float newX = newpos.get(0, 0);
- float newY = newpos.get(1, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement