Class MathHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.MathHelper
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic floathashToUnitFloat(int seed) Hashes an integer seed into a deterministic pseudo-random unit float.
-
Field Details
-
TAU
public static final float TAU- See Also:
-
-
Method Details
-
hashToUnitFloat
public static float hashToUnitFloat(int seed) Hashes an integer seed into a deterministic pseudo-random unit float.This is useful for stable visual effects where the same input seed should always place the same particle, sparkle, or geometry element without storing per-instance random state.
- Parameters:
seed- The integer seed to hash.- Returns:
- A deterministic value in the range [0, 1).
-