Skip to content

Commit

Permalink
Add nextInt(n) and nextLong(l)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacl committed Sep 13, 2024
1 parent 89b82f3 commit 042c378
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lila/src/main/scala/Random.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ object SecureRandom extends RandomApi:
private abstract class RandomApi:
protected def impl: java.util.Random

def nextBoolean() = impl.nextBoolean
def nextDouble() = impl.nextDouble
def nextFloat() = impl.nextFloat
def nextGaussian() = impl.nextGaussian
def nextInt() = impl.nextInt
def nextLong() = impl.nextLong
def nextBoolean() = impl.nextBoolean
def nextDouble() = impl.nextDouble
def nextFloat() = impl.nextFloat
def nextGaussian() = impl.nextGaussian
def nextInt() = impl.nextInt
def nextInt(n: Int) = impl.nextInt(n)
def nextLong() = impl.nextLong
def nextLong(l: Long) = impl.nextLong(l)

def nextBytes(len: Int): Array[Byte] =
val bytes = new Array[Byte](len)
Expand Down

0 comments on commit 042c378

Please sign in to comment.