Rotation Equation

Member
Posts: 40
Joined: 2008.10
Post: #1
Does anyone know of a general fast and simple 2D rotation equation in the form of where you input a point (x,y), it's axis (x2,y2) and the amount of rotation you want to be applied and it returns the new rotated point.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #2
Constructively (x3,y3)=(x2,y2)+cos(a)*(dx,dy)+(-dy,dx)*sin(a)

where a is the angle, dx=x-x2, dy=y-y2.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Post Reply