toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-foundation
/
korlibs.math.random
Package-level
declarations
Types
Functions
Types
Random
Weights
Link copied to clipboard
data
class
RandomWeights
<
T
>
(
val
weightsMap
:
Map
<
T
,
Double
>
)
Functions
doubles
Link copied to clipboard
fun
Random
.
doubles
(
)
:
Sequence
<
Double
>
floats
Link copied to clipboard
fun
Random
.
floats
(
)
:
Sequence
<
Float
>
get
Link copied to clipboard
operator
fun
Random
.
get
(
rectangle
:
Rectangle
)
:
Point
operator
fun
<
T
>
Random
.
get
(
list
:
List
<
T
>
)
:
T
operator
fun
Random
.
get
(
range
:
IntRange
)
:
Int
operator
fun
Random
.
get
(
range
:
LongRange
)
:
Long
operator
fun
<
T
:
Interpolable
<
T
>
>
Random
.
get
(
l
:
T
,
r
:
T
)
:
T
operator
fun
Random
.
get
(
l
:
Angle
,
r
:
Angle
)
:
Angle
operator
fun
Random
.
get
(
min
:
Ratio
,
max
:
Ratio
)
:
Ratio
operator
fun
Random
.
get
(
min
:
Double
,
max
:
Double
)
:
Double
operator
fun
Random
.
get
(
min
:
Float
,
max
:
Float
)
:
Float
operator
fun
Random
.
get
(
min
:
Int
,
max
:
Int
)
:
Int
ints
Link copied to clipboard
fun
Random
.
ints
(
)
:
Sequence
<
Int
>
fun
Random
.
ints
(
range
:
IntRange
)
:
Sequence
<
Int
>
fun
Random
.
ints
(
from
:
Int
,
until
:
Int
)
:
Sequence
<
Int
>
next
Double
Inclusive
Link copied to clipboard
fun
Random
.
nextDoubleInclusive
(
)
:
Double
next
Ratio
Link copied to clipboard
fun
Random
.
nextRatio
(
)
:
Ratio
next
Ratio
Inclusive
Link copied to clipboard
fun
Random
.
nextRatioInclusive
(
)
:
Ratio
random
Link copied to clipboard
fun
<
T
>
List
<
T
>
.
random
(
random
:
Random
=
Random
)
:
T
random
With
Weights
Link copied to clipboard
fun
<
T
>
List
<
T
>
.
randomWithWeights
(
weights
:
List
<
Double
>
,
random
:
Random
=
Random
)
:
T
set
To
Random
Link copied to clipboard
fun
<
T
:
MutableInterpolable
<
T
>
>
T
.
setToRandom
(
min
:
T
,
max
:
T
,
random
:
Random
=
Random
)
shuffled
Weighted
Link copied to clipboard
fun
<
T
>
Random
.
shuffledWeighted
(
weights
:
RandomWeights
<
T
>
)
:
List
<
T
>
fun
<
T
>
Random
.
shuffledWeighted
(
weights
:
Map
<
T
,
Double
>
)
:
List
<
T
>
fun
<
T
>
Random
.
shuffledWeighted
(
values
:
List
<
T
>
,
weights
:
List
<
Double
>
)
:
List
<
T
>
weighted
Link copied to clipboard
fun
<
T
>
Random
.
weighted
(
weights
:
RandomWeights
<
T
>
)
:
T
fun
<
T
>
Random
.
weighted
(
weights
:
Map
<
T
,
Double
>
)
:
T