projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r2123: *** empty log message ***
[ctsim.git]
/
libctgraphics
/
ezplot.cpp
diff --git
a/libctgraphics/ezplot.cpp
b/libctgraphics/ezplot.cpp
index cfab1d8ecc4ba6496554597b5de5fd814716fc1a..cf98ba47d4249deef3c4b89424d4841c6a807bb6 100644
(file)
--- a/
libctgraphics/ezplot.cpp
+++ b/
libctgraphics/ezplot.cpp
@@
-6,7
+6,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: ezplot.cpp,v 1.3
3 2001/03/11 15:27:30
kevin Exp $
+** $Id: ezplot.cpp,v 1.3
4 2002/05/28 18:43:16
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-1234,7
+1234,7
@@
loop:
*/
static inline double
*/
static inline double
-trunc (double x)
+
my_
trunc (double x)
{
double integer;
{
double integer;
@@
-1265,7
+1265,7
@@
EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl
if (*nfrac < 0) { // calculate frac
delta /= pow (10., floor(logt)); // scale delta
if (*nfrac < 0) { // calculate frac
delta /= pow (10., floor(logt)); // scale delta
- frac = static_cast<int>(fabs(trunc(log10(delta)))) + 1;
+ frac = static_cast<int>(fabs(
my_
trunc(log10(delta)))) + 1;
if (frac < 1)
frac = 1; // to be safe, add decimal pt
} else // use users' frac
if (frac < 1)
frac = 1; // to be safe, add decimal pt
} else // use users' frac
@@
-1276,7
+1276,7
@@
EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl
++wid;
sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g");
} else { // use fixed format
++wid;
sprintf (fmtstr, "%s%d%s%d%s", "%", wid, ".", frac, "g");
} else { // use fixed format
- wid = static_cast<int>(trunc(logt)) + 1;
+ wid = static_cast<int>(
my_
trunc(logt)) + 1;
if (wid < 1)
wid = 1;
if (minval < 0. || maxval < 0.)
if (wid < 1)
wid = 1;
if (minval < 0. || maxval < 0.)
@@
-1286,7
+1286,7
@@
EZPlot::make_numfmt (char *fmtstr, int *fldwid, int *nfrac, double minval, doubl
if (delta >= 0.999999)
frac = 1; // add a decimal pt to be safe
else
if (delta >= 0.999999)
frac = 1; // add a decimal pt to be safe
else
- frac = static_cast<int>(fabs(trunc(log10(delta)))) + 1;
+ frac = static_cast<int>(fabs(
my_
trunc(log10(delta)))) + 1;
} else // use users' frac
frac = *nfrac;
} else // use users' frac
frac = *nfrac;