Skip to content

Commit

Permalink
Fix incorrect restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
rleonid committed Apr 14, 2016
1 parent c4ca926 commit 09593d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/util/oml_probability.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module A = Oml_array

type t = float

let restrict x = max 1. (min 0. x)
let restrict x = min 1. (max 0. x)

let check x = if x > 1. then None else if x < 0. then None else Some x

Expand Down

0 comments on commit 09593d7

Please sign in to comment.