From 77b632071b60834eb51a630a39ffa0366875c7a2 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 2 Oct 1996 22:07:55 +0000 Subject: [PATCH] flower-1.0.2 --- flower/real.hh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 flower/real.hh diff --git a/flower/real.hh b/flower/real.hh new file mode 100644 index 0000000000..1f2187c8c1 --- /dev/null +++ b/flower/real.hh @@ -0,0 +1,25 @@ +#ifndef REAL_HH +#define REAL_HH +typedef double Real; +inline Real sqr(Real x){ + return x*x; +} +inline Real MIN(Real x, Real y) { + return (x < y)? x : y; +} + +inline Real MAX(Real x, Real y) { + return (x > y) ? x : y; +} + +inline Real ABS(Real x) +{ + return (x>0)? x:-x; +} +inline +int sgn(Real x) { + if (!x)return 0; + return (x > 0) ?1: -1; +} + +#endif -- 2.39.5