10
1
mirror of https://gitlab.com/scemama/QCaml.git synced 2024-07-11 22:03:37 +02:00
QCaml/Nuclei/Charge.ml

15 lines
253 B
OCaml
Raw Normal View History

2018-01-02 22:02:01 +01:00
type t = float
let of_float x = x
let of_int i = Float.of_int i
let of_string s = Float.of_string s
let to_float x = x
let to_int x = Float.to_int x
let to_string x =
if x >= 0. then
Printf.sprintf "+%f" x
else
Printf.sprintf "%f" x