mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
bugfix: CCRandom.float_range
This commit is contained in:
parent
ccb8634304
commit
56d53bfef6
2 changed files with 2 additions and 4 deletions
|
|
@ -70,8 +70,7 @@ let float f st = Random.State.float st f
|
|||
|
||||
let small_float = float 100.0
|
||||
|
||||
let float_range i j st = i +. Random.State.float st (j-.i+.1.)
|
||||
|
||||
let float_range i j st = i +. Random.State.float st (j-.i)
|
||||
|
||||
let replicate n g st =
|
||||
let rec aux acc n =
|
||||
|
|
|
|||
|
|
@ -97,10 +97,9 @@ val float : float -> float t
|
|||
@since 0.6.1 *)
|
||||
|
||||
val float_range : float -> float -> float t
|
||||
(** Inclusive range
|
||||
(** Inclusive range. [float_range a b] assumes [a < b].
|
||||
@since 0.6.1 *)
|
||||
|
||||
|
||||
val split : int -> (int * int) option t
|
||||
(** Split a positive value [n] into [n1,n2] where [n = n1 + n2].
|
||||
@return [None] if the value is too small *)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue