Angle Calculator

  scripts
  sprites
See inside
Instructions

Move the mouse around :)

The angle in the top-left corner shows the angle of the blue line and the gradient shows the gradient of it.

Notes and Credits

This just started off as a test project to see the powers of atan, but then I decided it deserved a nice UI and this happened :)

Please love completely pen-rendered UI :)

How the angle of the blue line is calculated:
atan([mouse x] ÷ [mouse y]) + 180 × ([mouse y] < 0)

How the gradient of the blue line is calculated:
[mouse y] ÷ [mouse x]

How the angle from 90° is calculated:
(atan([mouse x] ÷ [mouse y]) + 270 - 180 × ([mouse y] < 0)) mod 360

This was inspired by a project I saw a while ago by @ScratchinJoJo:
https://scratch.mit.edu/projects/84587556/

Credit to @djpro for the pen text engine which I modified :)

Shared: 24 Oct 2015 Modified: 30 Oct 2015
Favorite this project 38
Love this project 61
Total views 781
View the remix tree  3
  
More projects by chooper100