Package com.plotsquared.core.util
Class MathMan
java.lang.Object
com.plotsquared.core.util.MathMan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final floatatan2(float y, float x) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static final intaverage(int a, int b) static intfloorMod(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static final intgcd(int[] a) static final intgcd(int a, int b) static float[]getDirection(float yaw, float pitch) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static doublegetMean(double[] array) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static doublegetMean(int[] array) static float[]getPitchAndYaw(float x, float y, float z) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intgetPositiveId(int i) static doublegetSD(double[] array, double av) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static doublegetSD(int[] array, double av) static longinverseRound(double val) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static floatinvSqrt(float x) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static booleanstatic booleanisPowerOfTwo(int number) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intmod(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intpair(short x, short y) static bytepair16(byte x, byte y) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static longpairInt(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static introundInt(double value) static intsqrt(int x) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static doublesqrtApprox(double d) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static floatsqrtApprox(float f) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static byteunpair16x(byte value) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static byteunpair16y(byte value) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intunpairIntX(long pair) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intunpairIntY(long pair) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static shortunpairX(int hash) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static shortunpairY(int hash) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.static intunsignedmod(int x, int y) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally.
-
Constructor Details
-
MathMan
public MathMan()
-
-
Method Details
-
gcd
-
gcd
-
pairInt
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unpairIntX
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unpairIntY
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
pair16
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unpair16x
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unpair16y
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
inverseRound
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
sqrt
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
getMean
-
getMean
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
pair
-
average
-
unpairX
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unpairY
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
getDirection
@Deprecated(forRemoval=true, since="6.11.1") public static float[] getDirection(float yaw, float pitch) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release.get the x,y,z unit vector from pitch and yaw specified- Parameters:
yaw- yawpitch- pitch- Returns:
- x, y, z unit vector
-
floorMod
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
roundInt
-
getPitchAndYaw
@Deprecated(forRemoval=true, since="6.11.1") public static float[] getPitchAndYaw(float x, float y, float z) Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release.Returns [ pitch, yaw ]- Parameters:
x- xy- yz- z- Returns:
- pitch and yaw of x,y,z from 0,0,0
-
atan2
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
sqrtApprox
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
sqrtApprox
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
invSqrt
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
getPositiveId
-
isInteger
-
getSD
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
getSD
-
mod
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
unsignedmod
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release. -
isPowerOfTwo
Deprecated, for removal: This API element is subject to removal in a future version.Unused internally. Scheduled for removal in next major release.
-