To demo: Click the Green Flag, and move your cursor around. To use (as intended): Copy the variable and the custom script into your backpack. To program with it, first call the custom block "atan2" and supply and (x, y) coordinate. Then, from that point forward, the variable will contain the value last computed by atan2. The value from the custom block will be measured in degrees.
Originally intended for cubby208, and others seeking the VERY useful "atan2" function in Scratch. Atan2 is a mathematical function (peice-wise function) that turns a coordinate (x, y) into a measurement of rotation, with respect to the origin (0, 0) on a Unit Circle. Since Scratch does not include a "atan2" block/funciton, this was created to give that functionality to Scratch users requiring the conversion of a point to rotation. This custom block converts the point into "degrees", since the Scratch cos/sin/tan/acos/asin/atan are all in degrees. But remember, to convert degrees to radians just multiply the degrees by (PI / 180) ;-D