Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
Rotation.java
1 package org.bukkit;
2 
3 /**
4  * An enum to specify a rotation based orientation, like that on a clock.
5  * <p>
6  * It represents how something is viewed, as opposed to cardinal directions.
7  */
8 public enum Rotation {
9 
10  /**
11  * No rotation
12  */
14  /**
15  * Rotated clockwise by 90 degrees
16  */
18  /**
19  * Flipped upside-down, a 180 degree rotation
20  */
22  /**
23  * Rotated counter-clockwise by 90 degrees
24  */
26  ;
27 
28  private static final Rotation [] rotations = values();
29 
30  /**
31  * Rotate clockwise by 90 degrees.
32  *
33  * @return the relative rotation
34  */
36  return rotations[(this.ordinal() + 1) & 0x3];
37  }
38 
39  /**
40  * Rotate counter-clockwise by 90 degrees.
41  *
42  * @return the relative rotation
43  */
45  return rotations[(this.ordinal() - 1) & 0x3];
46  }
47 }
Rotation rotateClockwise()
Definition: Rotation.java:35
Rotation rotateCounterClockwise()
Definition: Rotation.java:44