Interface RandomNumberEngine

All Superinterfaces:
AutoCloseable, Comparable<JoltPhysicsObject>, ConstJoltPhysicsObject
All Known Implementing Classes:
DefaultRandomEngine, Mt19937

public interface RandomNumberEngine extends ConstJoltPhysicsObject
Interface to a pseudo-random number engine.
  • Method Details

    • max

      long max()
      Return the maximum value that can be generated.
      Returns:
      an unsigned 32-bit value
    • min

      long min()
      Return the minimum value that can be generated.
      Returns:
      an unsigned 32-bit value
    • nextInt

      int nextInt()
      Return the next integer in the sequence.
      Returns:
      a signed 32-bit value
    • nextUnsigned

      long nextUnsigned()
      Return the next integer in the sequence.
      Returns:
      an unsigned 32-bit value
    • seed

      void seed(int value)
      Seed the engine with the specified value.
      Parameters:
      value - the value to use