10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-11-07 22:53:41 +01:00
QCaml/Utils/Positive_float.ml

13 lines
178 B
OCaml
Raw Normal View History

2018-01-02 22:33:17 +01:00
type t = float
2018-01-02 22:02:01 +01:00
let of_float x =
assert ( x >= 0. );
x
let to_float x = x
let to_string x = string_of_float @@ to_float x
let of_string x = of_float @@ float_of_string x