GetLayerAngle
From Spheriki
Returns the angle about which a layer has been rotated.
Contents |
[edit]
Usage
number GetLayerAngle(layer);
- layer Number, non-negative. The index of the layer to query.
- number is returned, the value of which is measured in radians anticlockwise.
[edit]
Examples
The following example assumes there are at least three layers on whatever map is being used.
SetLayerAngle(2, Math.PI * 0.5); var bleh = GetLayerAngle(2);
This sets the angle of layer 2 of the current map to 90 degrees anticlockwise (or pi / 2 radians), which is equivalent to turning it on it's left side. Then that value is grabbed out again and placed into the variable bleh.
[edit]
Notes
- Naturally, this function only makes sense in the context of map engine execution. That is, the map engine should be running before you call this.
- Like all functions that deal with angles, this function operates in radians. Conversion between degrees and radians is trivial.
- The angle of rotation of a layer can be set using SetLayerAngle().
[edit]

