xxxxxxxxxx
# to get a vector from an angle, implement something like the code below:
vector = Vector2(cos(theta), sin(theta))
# if this doesn't give accurate results, check whether you are using the right
# angle units for the function (degs or rads) and if it is flipped around the
# mirror line y=x swap the cos ans sin functions.
xxxxxxxxxx
// note that Y is first
rad = atan2(y, x)
deg = atan2(y, x)*180/pi
xxxxxxxxxx
when green flag clicked
set x to 5
set y to 3
set angleRadians to arctan (y / x)
set angleDegrees to angleRadians * (180 / 3.14159)
say angleDegrees