Atan2

by Kaiochao
atan2(x, y)
ID:2267845
 
atan2(x, y) returns the smallest angle in clockwise degrees between the vector (0, 1) and the vector (x, y).

Given a vector from one point to another point, this gives you an angle in degrees. This angle can be used for getting a rotation matrix to point something toward something else using atom.transform.
Wait why is it relative to (0, 1) and not (1, 0)?
 var/icon/I = new(usr.icon)
I.Turn(90)
sleep(22.5)
I.Turn(-90)
view() << "Kachoo"