Package com.csse3200.game.utils.math
Class RandomUtils
java.lang.Object
com.csse3200.game.utils.math.RandomUtils
Utility class for generating random numbers and vectors.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.badlogic.gdx.math.GridPoint2
random
(com.badlogic.gdx.math.GridPoint2 start, com.badlogic.gdx.math.GridPoint2 end) Generates a random GridPoint2 between two given GridPoint2s.static com.badlogic.gdx.math.Vector2
random
(com.badlogic.gdx.math.Vector2 start, com.badlogic.gdx.math.Vector2 end) Generates a random Vector2 between two given vectors.
-
Method Details
-
random
public static com.badlogic.gdx.math.Vector2 random(com.badlogic.gdx.math.Vector2 start, com.badlogic.gdx.math.Vector2 end) Generates a random Vector2 between two given vectors.- Parameters:
start
- The starting vectorend
- The ending vector- Returns:
- A random Vector2 between the two given vectors
-
random
public static com.badlogic.gdx.math.GridPoint2 random(com.badlogic.gdx.math.GridPoint2 start, com.badlogic.gdx.math.GridPoint2 end) Generates a random GridPoint2 between two given GridPoint2s.- Parameters:
start
- The starting GridPoint2end
- The ending GridPoint2- Returns:
- A random GridPoint2 between the two given GridPoint2s
-