ATAN2 needs the difference between target and source coords where you're only using the target coords in mousex() and mousey()
Could be neater...
Could be neater...
Graphics 800,600 SetColor 255,255,255 SetOrigin(GraphicsWidth()/2,GraphicsHeight()/2) 'HideMouse() Local varx : Float Repeat mx=MouseX() my=MouseY() x1 = mx-400 y1 = my-300 SetRotation ATan2(y1,x1) varx = GetRotation() DrawText "rotation = " + String(varx), 10,10 Flip Cls Until KeyHit(key_escape) = 1