bugfix: CCRandom.float_range

This commit is contained in:
Simon Cruanes 2015-06-17 15:57:00 +02:00
parent ccb8634304
commit 56d53bfef6
2 changed files with 2 additions and 4 deletions

View file

@ -70,8 +70,7 @@ let float f st = Random.State.float st f
let small_float = float 100.0 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 replicate n g st =
let rec aux acc n = let rec aux acc n =

View file

@ -97,10 +97,9 @@ val float : float -> float t
@since 0.6.1 *) @since 0.6.1 *)
val float_range : float -> float -> float t val float_range : float -> float -> float t
(** Inclusive range (** Inclusive range. [float_range a b] assumes [a < b].
@since 0.6.1 *) @since 0.6.1 *)
val split : int -> (int * int) option t val split : int -> (int * int) option t
(** Split a positive value [n] into [n1,n2] where [n = n1 + n2]. (** Split a positive value [n] into [n1,n2] where [n = n1 + n2].
@return [None] if the value is too small *) @return [None] if the value is too small *)