From 7e86889f1e808cecbca49bb97c50103a956aef32 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 22 Dec 2015 10:22:30 +0100 Subject: [PATCH] remove deprecated `CCFloat.sign` --- src/core/CCFloat.ml | 5 ----- src/core/CCFloat.mli | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/core/CCFloat.ml b/src/core/CCFloat.ml index b73b311b..75336d7f 100644 --- a/src/core/CCFloat.ml +++ b/src/core/CCFloat.ml @@ -71,11 +71,6 @@ type 'a random_gen = Random.State.t -> 'a let pp buf = Printf.bprintf buf "%f" let print fmt = Format.pp_print_float fmt -let sign (a:float) = - if a < 0.0 then -1 - else if a > 0.0 then 1 - else 0 - let fsign a = if is_nan a then nan else if a = 0. then a diff --git a/src/core/CCFloat.mli b/src/core/CCFloat.mli index 7485206d..1cc33188 100644 --- a/src/core/CCFloat.mli +++ b/src/core/CCFloat.mli @@ -76,11 +76,6 @@ val random : t -> t random_gen val random_small : t random_gen val random_range : t -> t -> t random_gen -val sign : t -> int -(** [sign t] is one of [-1, 0, 1], depending on how the float - compares to [0.] - @deprecated since 0.7 use {! fsign} or {!sign_exn} since it's more accurate *) - val fsign : t -> float (** [fsign x] is one of [-1., -0., +0., +1.], or [nan] if [x] is NaN. @since 0.7 *)