Package ch.njol.util
Class VectorMath
java.lang.Object
ch.njol.util.VectorMath
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doublestatic final doublestatic final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyVector(Vector vector1, Vector vector2) Copies vector components ofvector2intovector1.static VectorfromCylindricalCoordinates(double radius, double phi, double height) static floatfromNotchPitch(float notchPitch) static floatfromNotchYaw(float notchYaw) static floatfromSkriptPitch(float pitch) static floatfromSkriptYaw(float yaw) static VectorfromSphericalCoordinates(double radius, double theta, double phi) static VectorfromYawAndPitch(float yaw, float pitch) static floatstatic floatstatic booleanCheck whether or not each component of this vector is equal to 0.static floatnotchPitch(float pitch) static floatnotchYaw(float yaw) static Vectorstatic Vectorstatic Vectorstatic Vectorstatic Vectorstatic Vectorstatic floatskriptPitch(float pitch) static floatskriptYaw(float yaw) static floatwrapAngleDeg(float angle)
-
Field Details
-
PI
public static final double PI- See Also:
-
HALF_PI
public static final double HALF_PI- See Also:
-
DEG_TO_RAD
public static final double DEG_TO_RAD- See Also:
-
RAD_TO_DEG
public static final double RAD_TO_DEG- See Also:
-
-
Constructor Details
-
VectorMath
public VectorMath()
-
-
Method Details
-
fromSphericalCoordinates
-
fromCylindricalCoordinates
-
fromYawAndPitch
-
getYaw
-
getPitch
-
setYaw
-
setPitch
-
rotX
-
rotY
-
rotZ
-
rot
-
notchYaw
public static float notchYaw(float yaw) -
notchPitch
public static float notchPitch(float pitch) -
fromNotchYaw
public static float fromNotchYaw(float notchYaw) -
fromNotchPitch
public static float fromNotchPitch(float notchPitch) -
skriptYaw
public static float skriptYaw(float yaw) -
skriptPitch
public static float skriptPitch(float pitch) -
fromSkriptYaw
public static float fromSkriptYaw(float yaw) -
fromSkriptPitch
public static float fromSkriptPitch(float pitch) -
wrapAngleDeg
public static float wrapAngleDeg(float angle) -
copyVector
Copies vector components ofvector2intovector1. -
isZero
Check whether or not each component of this vector is equal to 0.
ReplacesVector#isZero()since that method was added in spigot 1.19.3- Returns:
- true if equal to zero, false if at least one component is non-zero
-