Class: OsuRuby::FastRandom
- Inherits:
-
Object
- Object
- OsuRuby::FastRandom
- Defined in:
- (osu-ruby2 0.0.2) osu-ruby2/fast_random.rb
Overview
Fast PRNG used by osu!
Instance Method Summary collapse
-
#initialize(seed) ⇒ FastRandom
constructor
A new instance of FastRandom.
-
#next_bool ⇒ Boolean
obtain next boolean.
-
#next_bytes(string) ⇒ String
obtain random bytes for given string buffer.
-
#next_double ⇒ Float
obtain next double.
-
#next_range(a, b) ⇒ Float
obtain value with given range.
-
#next_ulong ⇒ Integer
(also: #next)
obtain next 32-bit integer.
-
#reset(seed)
reset the seeding.
Constructor Details
#initialize(seed) ⇒ FastRandom
Returns a new instance of FastRandom.
Instance Method Details
#next_bool ⇒ Boolean
obtain next boolean
#next_bytes(string) ⇒ String
obtain random bytes for given string buffer
#next_double ⇒ Float
obtain next double
#next_range(a, b) ⇒ Float
obtain value with given range
#next_ulong ⇒ Integer Also known as: next
obtain next 32-bit integer
#reset(seed)
This method returns an undefined value.
reset the seeding.