math - Working out point location relative to other point when rotated - C# XNA -


i have small rectangle, point @ center. have point, outside of rectangle, 10 pixels left of rectangle's center point when rectangle sitting vertically, not rotated. how go keeping outside point in same place relative rectangle when rectangle rotated center?

thanks

here example of how rotate 1 point around point in xna:

public vector2 rotatepoint(vector2 pointtorotate, vector2 centerofrotation, float angleofrotation) {     matrix rotationmatrix = matrix.createrotationz(angleofrotation);     return vector2.transform(pointtorotate - centerofrotation, rotationmatrix); } 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -