Skip to content

Commit

Permalink
Merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
CodaFi committed Mar 17, 2016
2 parents 44ec84b + 1d8f159 commit 8d53e21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/Random.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ extension Int64 : RandomType {
let q : Double = 1000
let k = Double(h) - Double(l) + 1
let magtgt = k * q

func entropize(mag : Double, _ v : Double, _ g : G) -> (Double, G) {
if mag >= magtgt {
return (v, g)
Expand All @@ -204,7 +204,7 @@ extension Int64 : RandomType {
return entropize(mag * b, v_, g_)
}
}

let (v, rng_) = entropize(1, 0, gen)
return (Int64(Double(l) + (v % k)), rng_)
}
Expand Down

0 comments on commit 8d53e21

Please sign in to comment.