Package net.minecraft.src
Class MathHelper
java.lang.Object
net.minecraft.src.MathHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic floatabs(float par0) static intabs_int(int par0) Returns the unsigned value of an int.static doubleabs_max(double par0, double par2) Maximum of the absolute value of two numbers.static doubleaverage(long[] par0ArrayOfLong) static intbucketInt(int par0, int par1) Buckets an integer with specifed bucket sizes.static intceiling_double_int(double par0) static intceiling_float_int(float par0) static floatclamp_float(float par0, float par1, float par2) Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parametersstatic intclamp_int(int par0, int par1, int par2) Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parameters.static final floatcos(float par0) cos looked up in the sin table with the appropriate offsetstatic intfloor_double(double par0) Returns the greatest integer less than or equal to the double argumentstatic longfloor_double_long(double par0) Long version of floor_doublestatic intfloor_float(float par0) Returns the greatest integer less than or equal to the float argumentstatic doublefunc_82713_a(String par0Str, double par1, double par3) static doublegetRandomDoubleInRange(Random par0Random, double par1, double par3) static intgetRandomIntegerInRange(Random par0Random, int par1, int par2) static doubleparseDoubleWithDefault(String par0Str, double par1) parses the string as double or returns the second parameter if it fails.static intparseIntWithDefault(String par0Str, int par1) parses the string as integer or returns the second parameter if it failsstatic intparseIntWithDefaultAndMax(String par0Str, int par1, int par2) parses the string as integer or returns the second parameter if it fails. this value is capped to par2static final floatsin(float par0) sin looked up in a tablestatic final floatsqrt_double(double par0) static final floatsqrt_float(float par0) static booleanstringNullOrLengthZero(String par0Str) Tests if a string is null or of length zerostatic inttruncateDoubleToInt(double par0) returns par0 cast as an int, and no greater than Integer.MAX_VALUE-1024static doublewrapAngleTo180_double(double par0) the angle is reduced to an angle between -180 and +180 by mod, and a 360 checkstatic floatwrapAngleTo180_float(float par0) the angle is reduced to an angle between -180 and +180 by mod, and a 360 check
-
Constructor Details
-
MathHelper
public MathHelper()
-
-
Method Details
-
sin
public static final float sin(float par0) sin looked up in a table -
cos
public static final float cos(float par0) cos looked up in the sin table with the appropriate offset -
sqrt_float
public static final float sqrt_float(float par0) -
sqrt_double
public static final float sqrt_double(double par0) -
floor_float
public static int floor_float(float par0) Returns the greatest integer less than or equal to the float argument -
truncateDoubleToInt
public static int truncateDoubleToInt(double par0) returns par0 cast as an int, and no greater than Integer.MAX_VALUE-1024 -
floor_double
public static int floor_double(double par0) Returns the greatest integer less than or equal to the double argument -
floor_double_long
public static long floor_double_long(double par0) Long version of floor_double -
abs
public static float abs(float par0) -
abs_int
public static int abs_int(int par0) Returns the unsigned value of an int. -
ceiling_float_int
public static int ceiling_float_int(float par0) -
ceiling_double_int
public static int ceiling_double_int(double par0) -
clamp_int
public static int clamp_int(int par0, int par1, int par2) Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parameters. -
clamp_float
public static float clamp_float(float par0, float par1, float par2) Returns the value of the first parameter, clamped to be within the lower and upper limits given by the second and third parameters -
abs_max
public static double abs_max(double par0, double par2) Maximum of the absolute value of two numbers. -
bucketInt
public static int bucketInt(int par0, int par1) Buckets an integer with specifed bucket sizes. Args: i, bucketSize -
stringNullOrLengthZero
Tests if a string is null or of length zero -
getRandomIntegerInRange
-
getRandomDoubleInRange
-
average
public static double average(long[] par0ArrayOfLong) -
wrapAngleTo180_float
public static float wrapAngleTo180_float(float par0) the angle is reduced to an angle between -180 and +180 by mod, and a 360 check -
wrapAngleTo180_double
public static double wrapAngleTo180_double(double par0) the angle is reduced to an angle between -180 and +180 by mod, and a 360 check -
parseIntWithDefault
parses the string as integer or returns the second parameter if it fails -
parseIntWithDefaultAndMax
parses the string as integer or returns the second parameter if it fails. this value is capped to par2 -
parseDoubleWithDefault
parses the string as double or returns the second parameter if it fails. -
func_82713_a
-