diff --git a/AUTHORS.adoc b/AUTHORS.adoc index 93b85e2b..895cb10e 100644 --- a/AUTHORS.adoc +++ b/AUTHORS.adoc @@ -28,3 +28,4 @@ - Rand (@rand00) - Dave Aitken (@actionshrimp) - Etienne Millon (@emillon) +- Christopher Zimmermann (@madroach) diff --git a/src/core/CCFloat.ml b/src/core/CCFloat.ml index cb4062b9..0d6b53d0 100644 --- a/src/core/CCFloat.ml +++ b/src/core/CCFloat.ml @@ -16,6 +16,11 @@ module Infix = struct let (>) = Pervasives.(>) let (<=) = Pervasives.(<=) let (>=) = Pervasives.(>=) + let (~-) = Pervasives.(~-.) + let (+) = Pervasives.(+.) + let (-) = Pervasives.(-.) + let ( * ) = Pervasives.( *. ) + let (/) = Pervasives.(/.) end include Infix @@ -35,6 +40,8 @@ let is_nan x = (x : t) <> x let add = (+.) let sub = (-.) +let mul = ( *. ) +let div = (/.) let neg = (~-.) let abs = Pervasives.abs_float let scale = ( *. ) diff --git a/src/core/CCFloat.mli b/src/core/CCFloat.mli index 8b0e7241..77b3c46a 100644 --- a/src/core/CCFloat.mli +++ b/src/core/CCFloat.mli @@ -130,6 +130,21 @@ module Infix : sig val (>=) : t -> t -> bool (** @since 0.17 *) + + val (+) : t -> t -> t + (** Addition. @since NEXT_RELEASE *) + + val (-) : t -> t -> t + (** Subtraction. @since NEXT_RELEASE *) + + val (~-) : t -> t + (** Unary negation. @since NEXT_RELEASE *) + + val ( * ) : t -> t -> t + (** Multiplication. @since NEXT_RELEASE *) + + val (/) : t -> t -> t + (** Division. @since NEXT_RELEASE *) end include module type of Infix