Package io.github.srcimon.screwbox.core
Class Rotation
java.lang.Object
io.github.srcimon.screwbox.core.Rotation
- All Implemented Interfaces:
Serializable
,Comparable<Rotation>
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
double
degrees()
Returns the degrees value of thisRotation
.static Rotation
degrees
(double degrees) boolean
int
hashCode()
boolean
isNone()
Checks if there isn't any rotation.static Rotation
none()
static Rotation
static Rotation
ofMomentum
(double x, double y) Returns theRotation
-value of an objects momentum.static Rotation
ofMovement
(Vector momentum) Returns theRotation
-value of an objects momentum.double
radians()
Returns the radians value of thisRotation
.static Rotation
random()
Creates a new randomRotation
.toString()
-
Method Details
-
degrees
-
ofMomentum
Returns theRotation
-value of an objects momentum. This value equals the angle between a vertical line and theVector
starting on the button of this line.- See Also:
-
ofMovement
Returns theRotation
-value of an objects momentum. This value equals the angle between a vertical line and theVector
starting on the button of this line.- See Also:
-
none
-
random
Creates a new randomRotation
. -
radians
public double radians()Returns the radians value of thisRotation
. -
degrees
public double degrees()Returns the degrees value of thisRotation
. -
hashCode
public int hashCode() -
equals
-
toString
-
isNone
public boolean isNone()Checks if there isn't any rotation. -
of
-
applyOn
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Rotation>
-