cos

Rotate point in rectangle

I have a point in a rectangle that I need to rotate an arbitrary degree and find the x y of the point. How can I do this using javascript. Below the x,y would be something like 1,3 and after I pass 90 into the method it will return 3,1. |-------------| | * | | | | | |-------------| _____ | *| | ...

ActionScript applying rotation of sprite to startDrag()'s rectangle bounds

from my main class i call to create a sprite and add it to the stage private function addSwatch(evt:MouseEvent):void { if (stage.getObjectsUnderPoint(mousePoint()).length == 0) { var swatchSide:Number = 100; var newSwatch:Sprite = new Swatch(0 - swatchSide/2, 0 - swatchSide/2, swatchSide, swatchSide); newSwatch.x = mouseX; n...