Overview
| Comment: | Made pi a constant recognised by MTT for -cc and -oct. Required by NonlinearMSD example. Will cause problems for models which declare pi as a parameter. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
b36bb9b4a5a127d7b2b3b39118d64c73 |
| User & Date: | geraint@users.sourceforge.net on 2003-09-14 23:05:47.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2003-09-15
| ||
| 21:35:37 |
pi is now an implicit NOTVAR.
This eliminates the problem of duplicate declarations when -cc is used. | |
|
2003-09-14
| ||
| 23:05:47 |
Made pi a constant recognised by MTT for -cc and -oct. Required by NonlinearMSD example. Will cause problems for models which declare pi as a parameter. check-in: b36bb9b4a5 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
| 22:31:45 | Replaced ^ with pow (required for -cc and -oct). check-in: 8983165fd0 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/cc/include/useful-functions.hh
from [681ea58964]
to [a82d5274ea].
| ︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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);
}
| > > > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
const bool true = 1;
const bool false = 0;
*/
#else
#define cast_to_double static_cast<double>
using std::pow;
#endif /* ! __cplusplus */
static double pi = M_PI;
static double Pi = M_PI;
static double PI = M_PI;
static inline double
max (const double x1, const double x2)
{
return cast_to_double ((x1 >= x2) ? x1 : (x1 < x2) ? x2 : 0);
}
|
| ︙ | ︙ |