A Rotation is an alteration that will rotate a sprite around its center point. It has a number of interesting options in order to get your sprite oriented how you want it.

When applying a rotation to a child sprite, the angles are relative to the sprite's direct parent sprite, not the screen.

```
create routine as Start launch spinner end
create sprite from windmill-180x180.png as spinner
where center=90,90 and x=350 and y=160
having alt=rot1
end
create rotation as rot1
where speed=-100 distance=720 easein20 easeout=40
end
```

- speed={number}
- speed of rotation in degrees per second. This can be a negative value to rotate clockwise.
- distance={number}
- the distance to rotate -
**positive values only - speed sets direction.****OR,**useto travel the shortest distance to the given destination. In this case, the sign of*distance=short***speed**is ignored. - destination={number}
- rotate until this angle is reached
- toward={number},{number}
- rotate until pointing at this x,y coordinate
- easein={number}
- gradually increase speed over this distance (in degrees).
- easeout={number}
- before reaching distance, gradually decrease speed over this distance (in degrees).
- completion={routine}
- specify a routine or another alteration to run when the rotation stops