Class MatrixYRotation
java.lang.Object
org.sgrewritten.stargate.api.vectorlogic.MatrixYRotation
A vector rotation limited to n*pi/2 radians rotations
Rotates around y-axis. Rounded to avoid Math.sin and Math.cos approximation errors. DOES NOT PERMUTE INPUT VECTOR
- Author:
- Thorin
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the inverse rotation of this rotationorg.bukkit.util.Vector
performOperation
(org.bukkit.util.Vector vector) Performs the matrix y rotation on a vector
-
Constructor Details
-
MatrixYRotation
public MatrixYRotation(double rotation) Instantiates a new matrix y rotation- Parameters:
rotation
-A rotation given in radians
-
-
Method Details
-
performOperation
public org.bukkit.util.Vector performOperation(org.bukkit.util.Vector vector) Performs the matrix y rotation on a vector- Parameters:
vector
-The vector to perform the rotation on
- Returns:
A new vector with the changes applied
-
getInverse
Gets the inverse rotation of this rotation- Returns:
The reverse rotation of this rotation
-