Differences From Artifact [f0062089cf]:
- Executable file mttroot/mtt/cc/include/useful-functions.hh — part of check-in [0c91fc17d1] at 2002-06-17 14:30:34 on branch origin/master — Does not now define Octave functions unless explicitly compiling for STANDALONE or OCTAVEDLD. (user: geraint@users.sourceforge.net, size: 1849) [annotate] [blame] [check-ins using] [more...]
To Artifact [681ea58964]:
- Executable file mttroot/mtt/cc/include/useful-functions.hh — part of check-in [f222810d22] at 2003-09-13 22:26:39 on branch origin/master — Use std::pow instead of pow to avoid pow double/Complex ambiguity error. (user: geraint@users.sourceforge.net, size: 1865) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
/*
typedef unsigned int bool;
const bool true = 1;
const bool false = 0;
*/
#else
#define cast_to_double static_cast<double>
#endif /* ! __cplusplus */
static inline double
max (const double x1, const double x2)
{
return cast_to_double ((x1 >= x2) ? x1 : (x1 < x2) ? x2 : 0);
}
| > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
/*
typedef unsigned int bool;
const bool true = 1;
const bool false = 0;
*/
#else
#define cast_to_double static_cast<double>
using std::pow;
#endif /* ! __cplusplus */
static inline double
max (const double x1, const double x2)
{
return cast_to_double ((x1 >= x2) ? x1 : (x1 < x2) ? x2 : 0);
}
|
| ︙ | ︙ |