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 int
generateRandomInteger
(int minimum, int maximum) Generates a randomInteger
.static int
getMaxOrMin
(int value, int max, int min) Checks if a specificInteger
is in the given range.
-
Field Details
-
RANDOM
An easy to accessRandom
implementation for random number generation. This specific field is mostly used by the random methods of theParticleData
types.
-
-
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 specificInteger
is 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.
-