Angles and units
rotate()function to rotate and spin objects.
atan(). In the Khan Academy environment, the default is degrees, but it can be changed to radians like so:
angleMode = "radians";
radians()function will automatically convert values from degrees to radians, and the constants PI and TWO_PI provide convenient access to these commonly used numbers (equivalent to 180 and 360 degrees, respectively). The following code, for example, will rotate shapes by 60 degrees.
angleMode = "radians"; var angle = radians(60); rotate(angle);