Clarify wording in Random.nextInt/Long/UInt/ULong docs
#KT-30704 Fixed
This commit is contained in:
@@ -36,7 +36,7 @@ public abstract class Random {
|
||||
public open fun nextInt(): Int = nextBits(32)
|
||||
|
||||
/**
|
||||
* Gets the next random non-negative `Int` from the random number generator not greater than the specified [until] bound.
|
||||
* Gets the next random non-negative `Int` from the random number generator less than the specified [until] bound.
|
||||
*
|
||||
* Generates an `Int` random value uniformly distributed between `0` (inclusive) and the specified [until] bound (exclusive).
|
||||
*
|
||||
@@ -85,7 +85,7 @@ public abstract class Random {
|
||||
public open fun nextLong(): Long = nextInt().toLong().shl(32) + nextInt()
|
||||
|
||||
/**
|
||||
* Gets the next random non-negative `Long` from the random number generator not greater than the specified [until] bound.
|
||||
* Gets the next random non-negative `Long` from the random number generator less than the specified [until] bound.
|
||||
*
|
||||
* Generates a `Long` random value uniformly distributed between `0` (inclusive) and the specified [until] bound (exclusive).
|
||||
*
|
||||
@@ -152,7 +152,7 @@ public abstract class Random {
|
||||
public open fun nextDouble(): Double = doubleFromParts(nextBits(26), nextBits(27))
|
||||
|
||||
/**
|
||||
* Gets the next random non-negative `Double` from the random number generator not greater than the specified [until] bound.
|
||||
* Gets the next random non-negative `Double` from the random number generator less than the specified [until] bound.
|
||||
*
|
||||
* Generates a `Double` random value uniformly distributed between 0 (inclusive) and [until] (exclusive).
|
||||
*
|
||||
|
||||
@@ -16,7 +16,7 @@ package kotlin.random
|
||||
public fun Random.nextUInt(): UInt = nextInt().toUInt()
|
||||
|
||||
/**
|
||||
* Gets the next random [UInt] from the random number generator not greater than the specified [until] bound.
|
||||
* Gets the next random [UInt] from the random number generator not less the specified [until] bound.
|
||||
*
|
||||
* Generates a [UInt] random value uniformly distributed between `0` (inclusive) and the specified [until] bound (exclusive).
|
||||
*
|
||||
@@ -72,7 +72,7 @@ public fun Random.nextUInt(range: UIntRange): UInt = when {
|
||||
public fun Random.nextULong(): ULong = nextLong().toULong()
|
||||
|
||||
/**
|
||||
* Gets the next random [ULong] from the random number generator not greater than the specified [until] bound.
|
||||
* Gets the next random [ULong] from the random number generator less than the specified [until] bound.
|
||||
*
|
||||
* Generates a [ULong] random value uniformly distributed between `0` (inclusive) and the specified [until] bound (exclusive).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user