CPRand

org.cosplay.CPRand$
object CPRand

Provides convenient functions for random number generation and usage.

Attributes

See also

Random

Source
CPRand.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CPRand.type

Members list

Value members

Concrete methods

def between(a: Int, b: Int): Int

Gets random number in given range.

Gets random number in given range.

Value parameters

a

Inclusive start of the range.

b

Exclusive end of the range.

Attributes

Source
CPRand.scala
def between(a: Double, b: Double): Double

Gets random number in given range.

Gets random number in given range.

Value parameters

a

Inclusive start of the range.

b

Exclusive end of the range.

Attributes

Source
CPRand.scala
def between(a: Long, b: Long): Long

Gets random number in given range.

Gets random number in given range.

Value parameters

a

Inclusive start of the range.

b

Exclusive end of the range.

Attributes

Source
CPRand.scala
def between(a: Float, b: Float): Float

Gets random number in given range.

Gets random number in given range.

Value parameters

a

Inclusive start of the range.

b

Exclusive end of the range.

Attributes

Source
CPRand.scala
def coinFlip(): Boolean

Random boolean value.

Random boolean value.

Attributes

Source
CPRand.scala
def guid: String

Creates new globally unique 16-bytes type 4 UUID.

Creates new globally unique 16-bytes type 4 UUID.

Attributes

Source
CPRand.scala
def guid6: String

Creates new 6-bytes UUID. This UUID is NOT globally unique.

Creates new 6-bytes UUID. This UUID is NOT globally unique.

Attributes

Source
CPRand.scala

Gets a random green color from the list of CPColor.CS_X11_GREENS.

Gets a random green color from the list of CPColor.CS_X11_GREENS.

Attributes

Source
CPRand.scala
def rand[T](seq: Seq[T]): T

Gets random value from the given sequence. It's equivalent to:

Gets random value from the given sequence. It's equivalent to:

   seq(RND.nextInt(seq.size))

Value parameters

seq

Sequence to get the random value from.

Attributes

Source
CPRand.scala
def randDigit(): Char

Geta a random digit.

Geta a random digit.

Attributes

Source
CPRand.scala
def randDouble(): Double

Gets the next pseudorandom, uniformly distributed double value between 0.0 and 1.0.

Gets the next pseudorandom, uniformly distributed double value between 0.0 and 1.0.

Attributes

Source
CPRand.scala
def randFloat(): Float

Gets the next pseudorandom, uniformly distributed float value between 0.0 and 1.0.

Gets the next pseudorandom, uniformly distributed float value between 0.0 and 1.0.

Attributes

Source
CPRand.scala
def randInt(from: Int, to: Int): Int

Gets random integer in the given range.

Gets random integer in the given range.

Value parameters

from

Inclusive range from value.

to

Inclusive range to value.

Attributes

Source
CPRand.scala
def randInt(): Int

Gets random integer.

Gets random integer.

Attributes

Source
CPRand.scala
def randIntExcl(from: Int, to: Int): Int

Gets random integer in the given range.

Gets random integer in the given range.

Value parameters

from

Inclusive range from value.

to

Inclusive range to value.

Attributes

Source
CPRand.scala
def randIntIncl(from: Int, to: Int): Int

Gets random integer in the given range.

Gets random integer in the given range.

Value parameters

from

Inclusive range from value.

to

Inclusive range to value.

Attributes

Source
CPRand.scala
def randLetter(): Char

Gets a random uppercase or lowercase letter.

Gets a random uppercase or lowercase letter.

Attributes

Source
CPRand.scala
def randLoLetter(): Char

Gets a random lowercase letter.

Gets a random lowercase letter.

Attributes

Source
CPRand.scala
def randLong(from: Long, to: Long): Long

Gets random long in the given range.

Gets random long in the given range.

Value parameters

from

Inclusive range from value.

to

Inclusive range to value.

Attributes

Source
CPRand.scala
def randLongExcl(from: Long, to: Long): Long

Gets random long in the given range.

Gets random long in the given range.

Value parameters

from

Inclusive range from value.

to

Inclusive range to value.

Attributes

Source
CPRand.scala
def randSymbol(): Char

Gets a random symbol from the list of ~!@#$%^&*()_+-=[]{}';:\",.<>/?.

Gets a random symbol from the list of ~!@#$%^&*()_+-=[]{}';:\",.<>/?.

Attributes

Source
CPRand.scala

Gets a random system color from the list of CPColor.C_SYS_GROUP.

Gets a random system color from the list of CPColor.C_SYS_GROUP.

Attributes

Source
CPRand.scala
def randUpLetter(): Char

Gets a random uppercase letter.

Gets a random uppercase letter.

Attributes

Source
CPRand.scala

Gets a random blue color from the list of CPColor.CS_X11_BLUES.

Gets a random blue color from the list of CPColor.CS_X11_BLUES.

Attributes

Source
CPRand.scala

Gets a random brown color from the list of CPColor.CS_X11_BROWNS.

Gets a random brown color from the list of CPColor.CS_X11_BROWNS.

Attributes

Source
CPRand.scala

Gets random xterm color from the list of CPColor.CS_X11_ALL.

Gets random xterm color from the list of CPColor.CS_X11_ALL.

Attributes

Source
CPRand.scala

Gets a random cyan color from the list of CPColor.CS_X11_CYANS.

Gets a random cyan color from the list of CPColor.CS_X11_CYANS.

Attributes

Source
CPRand.scala

Gets a random gray color from the list of CPColor.CS_X11_GRAYS.

Gets a random gray color from the list of CPColor.CS_X11_GRAYS.

Attributes

Source
CPRand.scala

Gets a random orange color from the list of CPColor.CS_X11_ORANGES.

Gets a random orange color from the list of CPColor.CS_X11_ORANGES.

Attributes

Source
CPRand.scala

Gets a random pink color from the list of CPColor.CS_X11_PINKS.

Gets a random pink color from the list of CPColor.CS_X11_PINKS.

Attributes

Source
CPRand.scala

Gets a random purple color from the list of CPColor.CS_X11_PURPLES.

Gets a random purple color from the list of CPColor.CS_X11_PURPLES.

Attributes

Source
CPRand.scala

Gets a random red color from the list of CPColor.CS_X11_REDS.

Gets a random red color from the list of CPColor.CS_X11_REDS.

Attributes

Source
CPRand.scala

Gets a random white color from the list of CPColor.CS_X11_WHITES.

Gets a random white color from the list of CPColor.CS_X11_WHITES.

Attributes

Source
CPRand.scala

Gets a random yellow color from the list of CPColor.CS_X11_YELLOWS.

Gets a random yellow color from the list of CPColor.CS_X11_YELLOWS.

Attributes

Source
CPRand.scala

Gets random xterm color from the list of CPColor.CS_XTERM_ALL.

Gets random xterm color from the list of CPColor.CS_XTERM_ALL.

Attributes

Source
CPRand.scala