Class MathHelper

java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.MathHelper

public final class MathHelper extends Object
  • Field Details

  • 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).