Find Right Angle to a Vector

BlitzMax Forums/BlitzMax Programming/Find Right Angle to a Vector

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

rotate through any degree:
[dx,dy] x [ cos a, -sin a]
          [ sin a,  cos a]


plug 90` into the rotation matrix and you get the rotation matrix
[ 0 , -1 ]
[ 1,  0  ]


and simplify the result:

[dy,-dx]