Package xyz.xenondevs.particle.utils
Class MathUtils
java.lang.Object
xyz.xenondevs.particle.utils.MathUtils
Utility for Maths
- Since:
- 14.09.2018
- Author:
- ByteZ
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intgenerateRandomInteger(int minimum, int maximum) Generates a randomInteger.static intgetMaxOrMin(int value, int max, int min) Checks if a specificIntegeris in the given range.
-
Field Details
-
RANDOM
An easy to accessRandomimplementation for random number generation. This specific field is mostly used by the random methods of theParticleDatatypes.
-
-
Constructor Details
-
MathUtils
public MathUtils()
-
-
Method Details
-
generateRandomInteger
public static int generateRandomInteger(int minimum, int maximum) Generates a randomInteger. -
getMaxOrMin
public static int getMaxOrMin(int value, int max, int min) Checks if a specificIntegeris in the given range. If not the respective bound of the range is returned.- Parameters:
value- the value which should be checked.max- the maximum value.min- the minimum value- Returns:
- the calculated value.
-