Specifying a Rotation
A rotation is generally specified by providing a single number that
indicates how many degrees the point should be rotated by. The number can
be either positive or negative. In the coordinate system we are using, a
positive number of degrees indicates a counter-clockwise turn.
Undo'ing a Rotation
If you have rotated an object by X degrees, and you want to undo this, you need to rotate the object again by -X degrees.
Example
The example below shows a rotation of 90 degrees. Since this is a
positive rotation, the rotation is counter-clockwise (in the
coordinate system that we are using). Also, 4 rotations of 90 degrees
totals 360 degrees, and thus the object returns back to the original
position.
| Back | Introductory Trail | Next | ||
| Index | Advanced Trail | Programmer's Trail | Game |