#ifndef MXMATH_INCLUDED // -*- C++ -*- #define MXMATH_INCLUDED #if !defined(__GNUC__) # pragma once #endif /************************************************************************ Standard math include file for the MixKit library. Copyright (C) 1998 Michael Garland. See "COPYING.txt" for details. $Id: MxMath.h,v 1.16 1998/10/26 21:09:09 garland Exp $ ************************************************************************/ #include // NOTE: The use of mx_real is deprecated, and the typedef will // be going away in the near future. // #ifdef MIX_REAL_FLOAT typedef float mx_real; #else #define MIX_REAL_DOUBLE typedef double mx_real; #endif // Some systems use HUGE_VAL instead of HUGE #if !defined(HUGE) && defined(HUGE_VAL) #define HUGE HUGE_VAL #endif // Handle platforms, such as Win32, which don't define M_PI in #ifndef M_PI #define M_PI 3.141592653589793238462643383279502884197169399375105820974944592308 #endif #ifndef FEQ_EPS #define FEQ_EPS 1e-6 #define FEQ_EPS2 1e-12 #endif inline bool FEQ(double a,double b,double eps=FEQ_EPS) { return fabs(a-b)