Skip to content

Commit

Permalink
Fix incorrect restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
rleonid committed Mar 2, 2016
1 parent eb6c73c commit a14705a
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 a14705a

Please sign in to comment.