From 9d2f88177fd94e7358c2b6b3e744c0352c64bb4f Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 2 Oct 1996 22:07:54 +0000 Subject: [PATCH] lilypond-0.0.1 --- const.hh | 11 +++++++++++ real.hh | 25 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 const.hh create mode 100644 real.hh diff --git a/const.hh b/const.hh new file mode 100644 index 0000000000..5a989e2e4c --- /dev/null +++ b/const.hh @@ -0,0 +1,11 @@ +/* + global constants + */ + + +const Real CM_TO_PT=72/2.54; +const Real VERT_TO_PT=CM_TO_PT; // tex output +const Real HOR_TO_PT=CM_TO_PT; // tex output +const Real EPS=1e-7; // qlpsolve.hh +const int MAXITER=100; // qlpsolve.hh +const Real INFTY=1e8; diff --git a/real.hh b/real.hh new file mode 100644 index 0000000000..1f2187c8c1 --- /dev/null +++ b/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