[Kst] kdeextragear-2/kst/plugins/linefit
George Staikos
staikos at kde.org
Thu Sep 25 19:26:05 CEST 2003
CVS commit by staikos:
lrint() not portable enough. rint() should be sufficient here anyways.
CCMAIL: 64926-done at bugs.kde.org
M +10 -2 linefit.c 1.9
--- kdeextragear-2/kst/plugins/linefit/linefit.c #1.8:1.9
@@ -13,4 +13,10 @@
#define Y 1
+
+int linefit(const double *const inArrays[], const int inArrayLens[],
+ const double is[],
+ double *outArrays[], int outArrayLens[],
+ double outScalars[]);
+
int linefit(const double *const inArrays[], const int inArrayLens[],
const double is[],
@@ -22,4 +28,6 @@ int linefit(const double *const inArrays
double xScale;
+ if (is) {} /* don't warn */
+
if (inArrayLens[Y] < 1 || inArrayLens[X] < 1) {
return -1;
@@ -49,5 +57,5 @@ int linefit(const double *const inArrays
for (i = 0; i < inArrayLens[Y]; i++) {
double z = xScale*i;
- long int idx = lrint(z);
+ long int idx = rint(z);
double skew = z - floor(z); /* [0..1] */
long int idx2 = idx + 1;
@@ -79,5 +87,5 @@ int linefit(const double *const inArrays
for (i = 0; i < inArrayLens[X]; i++) {
double z = xScale*i;
- long int idx = lrint(z);
+ long int idx = rint(z);
double skew = z - floor(z); /* [0..1] */
long int idx2 = idx + 1;
More information about the Kst
mailing list