Advertisement
Guest User

dsf

a guest
Jul 31st, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. Vector2 Rotate(Vector2 pivotPoint, float angle)
  2. {
  3.            vec2 rotated_point;
  4.            rotated_point.x = pivotPoint.x * cos(angle) - pivotPoint.y * sin(angle);
  5.            rotated_point.y = pivotPoint.x * sin(angle) + pivotPoint.y * cos(angle);
  6.            return rotated_point;
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement