Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
LabPlot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
LabPlot
Commits
c9fcbd64
Commit
c9fcbd64
authored
Jun 15, 2016
by
Stefan Gerlach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C header and isnan fixes
parent
8f8714d5
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
56 additions
and
61 deletions
+56
-61
src/backend/analysis/StatisticsFilter.cpp
src/backend/analysis/StatisticsFilter.cpp
+3
-3
src/backend/core/AbstractColumn.cpp
src/backend/core/AbstractColumn.cpp
+4
-4
src/backend/core/AbstractColumn.h
src/backend/core/AbstractColumn.h
+1
-1
src/backend/core/datatypes/DateTime2DoubleFilter.h
src/backend/core/datatypes/DateTime2DoubleFilter.h
+1
-1
src/backend/core/datatypes/DayOfWeek2DoubleFilter.h
src/backend/core/datatypes/DayOfWeek2DoubleFilter.h
+1
-1
src/backend/core/datatypes/Double2DateTimeFilter.h
src/backend/core/datatypes/Double2DateTimeFilter.h
+3
-3
src/backend/core/datatypes/Double2DayOfWeekFilter.h
src/backend/core/datatypes/Double2DayOfWeekFilter.h
+2
-2
src/backend/core/datatypes/Double2MonthFilter.h
src/backend/core/datatypes/Double2MonthFilter.h
+2
-2
src/backend/core/datatypes/Double2StringFilter.h
src/backend/core/datatypes/Double2StringFilter.h
+2
-2
src/backend/core/datatypes/Month2DoubleFilter.h
src/backend/core/datatypes/Month2DoubleFilter.h
+1
-1
src/backend/core/datatypes/String2DayOfWeekFilter.h
src/backend/core/datatypes/String2DayOfWeekFilter.h
+1
-1
src/backend/core/datatypes/String2DoubleFilter.h
src/backend/core/datatypes/String2DoubleFilter.h
+1
-1
src/backend/core/datatypes/String2MonthFilter.h
src/backend/core/datatypes/String2MonthFilter.h
+1
-1
src/backend/datapicker/ImageEditor.cpp
src/backend/datapicker/ImageEditor.cpp
+1
-1
src/backend/datapicker/Transform.cpp
src/backend/datapicker/Transform.cpp
+4
-6
src/backend/datasources/filters/BinaryFilter.cpp
src/backend/datasources/filters/BinaryFilter.cpp
+1
-2
src/backend/datasources/filters/HDFFilter.cpp
src/backend/datasources/filters/HDFFilter.cpp
+1
-2
src/backend/datasources/filters/ImageFilter.cpp
src/backend/datasources/filters/ImageFilter.cpp
+2
-2
src/backend/datasources/filters/NetCDFFilter.cpp
src/backend/datasources/filters/NetCDFFilter.cpp
+1
-2
src/backend/gsl/ExpressionParser.cpp
src/backend/gsl/ExpressionParser.cpp
+6
-4
src/backend/gsl/functions.h
src/backend/gsl/functions.h
+2
-2
src/backend/worksheet/Worksheet.cpp
src/backend/worksheet/Worksheet.cpp
+2
-2
src/backend/worksheet/plots/cartesian/Axis.cpp
src/backend/worksheet/plots/cartesian/Axis.cpp
+3
-5
src/backend/worksheet/plots/cartesian/CartesianCoordinateSystem.cpp
...d/worksheet/plots/cartesian/CartesianCoordinateSystem.cpp
+4
-4
src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
+2
-2
src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
+1
-1
src/commonfrontend/matrix/MatrixView.cpp
src/commonfrontend/matrix/MatrixView.cpp
+2
-2
src/kdefrontend/spreadsheet/StatisticsDialog.cpp
src/kdefrontend/spreadsheet/StatisticsDialog.cpp
+1
-1
No files found.
src/backend/analysis/StatisticsFilter.cpp
View file @
c9fcbd64
...
...
@@ -28,7 +28,7 @@
***************************************************************************/
#include "StatisticsFilter.h"
#include "core/AbstractColumn.h"
#include <
math.
h>
#include <
cmat
h>
class
StatisticsColumn
:
public
AbstractColumn
{
public:
...
...
@@ -148,7 +148,7 @@ void StatisticsFilter::inputDataChanged(int port)
// iterate over all rows, determining first_valid_row, last_valid_row, N, min, max and sum
for
(
int
row
=
0
;
row
<=
column
->
rowCount
();
row
++
)
{
double
val
=
m_inputs
.
at
(
port
)
->
valueAt
(
row
);
if
(
isnan
(
val
))
continue
;
if
(
std
::
isnan
(
val
))
continue
;
if
(
s
->
first_valid_row
==
-
1
)
s
->
first_valid_row
=
row
;
s
->
last_valid_row
=
row
;
s
->
N
++
;
...
...
@@ -167,7 +167,7 @@ void StatisticsFilter::inputDataChanged(int port)
s
->
variance
=
0
;
for
(
int
row
=
0
;
row
<=
column
->
rowCount
();
row
++
)
{
double
val
=
column
->
valueAt
(
row
);
if
(
isnan
(
val
))
continue
;
if
(
std
::
isnan
(
val
))
continue
;
s
->
variance
+=
pow
(
val
-
mean
,
2
);
}
s
->
variance
/=
double
(
s
->
N
);
...
...
src/backend/core/AbstractColumn.cpp
View file @
c9fcbd64
...
...
@@ -38,10 +38,10 @@
#include <QtCore/QDateTime>
#include <QtCore/QDate>
#include <QtCore/QTime>
#include <math.h>
#include <QMetaType>
#include <QDebug>
#include <KLocale>
#include <cmath>
/**
* \class AbstractColumn
...
...
@@ -213,7 +213,7 @@ void AbstractColumn::clear() {}
bool
AbstractColumn
::
isValid
(
int
row
)
const
{
switch
(
columnMode
())
{
case
AbstractColumn
::
Numeric
:
return
!
isnan
(
valueAt
(
row
));
return
!
std
::
isnan
(
valueAt
(
row
));
case
AbstractColumn
::
Text
:
return
!
textAt
(
row
).
isNull
();
case
AbstractColumn
::
DateTime
:
...
...
@@ -466,7 +466,7 @@ double AbstractColumn::minimum() const{
double
min
=
INFINITY
;
for
(
int
row
=
0
;
row
<
rowCount
();
row
++
)
{
val
=
valueAt
(
row
);
if
(
isnan
(
val
))
if
(
std
::
isnan
(
val
))
continue
;
if
(
val
<
min
)
...
...
@@ -480,7 +480,7 @@ double AbstractColumn::maximum() const{
double
max
=
-
INFINITY
;
for
(
int
row
=
0
;
row
<
rowCount
();
row
++
)
{
val
=
valueAt
(
row
);
if
(
isnan
(
val
))
if
(
std
::
isnan
(
val
))
continue
;
if
(
val
>
max
)
...
...
src/backend/core/AbstractColumn.h
View file @
c9fcbd64
...
...
@@ -31,7 +31,7 @@
#define ABSTRACTCOLUMN_H
#include "backend/core/AbstractAspect.h"
#include <
math.
h>
#include <
cmat
h>
class
AbstractColumnPrivate
;
class
AbstractSimpleFilter
;
...
...
src/backend/core/datatypes/DateTime2DoubleFilter.h
View file @
c9fcbd64
...
...
@@ -31,7 +31,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter QDateTime -> double (using Julian day).
class
DateTime2DoubleFilter
:
public
AbstractSimpleFilter
...
...
src/backend/core/datatypes/DayOfWeek2DoubleFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDate>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter QDateTime -> double, translating dates into days of the week (Monday -> 1).
class
DayOfWeek2DoubleFilter
:
public
AbstractSimpleFilter
...
...
src/backend/core/datatypes/Double2DateTimeFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter double -> QDateTime, interpreting the input numbers as (fractional) Julian days.
class
Double2DateTimeFilter
:
public
AbstractSimpleFilter
...
...
@@ -43,13 +43,13 @@ class Double2DateTimeFilter : public AbstractSimpleFilter
virtual
QDate
dateAt
(
int
row
)
const
{
if
(
!
m_inputs
.
value
(
0
))
return
QDate
();
double
inputValue
=
m_inputs
.
value
(
0
)
->
valueAt
(
row
);
if
(
isnan
(
inputValue
))
return
QDate
();
if
(
std
::
isnan
(
inputValue
))
return
QDate
();
return
QDate
::
fromJulianDay
(
qRound
(
inputValue
));
}
virtual
QTime
timeAt
(
int
row
)
const
{
if
(
!
m_inputs
.
value
(
0
))
return
QTime
();
double
inputValue
=
m_inputs
.
value
(
0
)
->
valueAt
(
row
);
if
(
isnan
(
inputValue
))
return
QTime
();
if
(
std
::
isnan
(
inputValue
))
return
QTime
();
// we only want the digits behind the dot and
// convert them from fraction of day to milliseconds
return
QTime
(
12
,
0
,
0
,
0
).
addMSecs
(
int
(
(
inputValue
-
int
(
inputValue
))
*
86400000.0
));
...
...
src/backend/core/datatypes/Double2DayOfWeekFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter double -> QDateTime, interpreting the input numbers as days of the week (1 = Monday).
class
Double2DayOfWeekFilter
:
public
AbstractSimpleFilter
...
...
@@ -42,7 +42,7 @@ class Double2DayOfWeekFilter : public AbstractSimpleFilter
virtual
QDate
dateAt
(
int
row
)
const
{
if
(
!
m_inputs
.
value
(
0
))
return
QDate
();
double
inputValue
=
m_inputs
.
value
(
0
)
->
valueAt
(
row
);
if
(
isnan
(
inputValue
))
return
QDate
();
if
(
std
::
isnan
(
inputValue
))
return
QDate
();
// Don't use Julian days here since support for years < 1 is bad
// Use 1900-01-01 instead (a Monday)
return
QDate
(
1900
,
1
,
1
).
addDays
(
qRound
(
inputValue
-
1.0
));
...
...
src/backend/core/datatypes/Double2MonthFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter double -> QDateTime, interpreting the input numbers as months of the year.
class
Double2MonthFilter
:
public
AbstractSimpleFilter
...
...
@@ -48,7 +48,7 @@ class Double2MonthFilter : public AbstractSimpleFilter
virtual
QDateTime
dateTimeAt
(
int
row
)
const
{
if
(
!
m_inputs
.
value
(
0
))
return
QDateTime
();
double
inputValue
=
m_inputs
.
value
(
0
)
->
valueAt
(
row
);
if
(
isnan
(
inputValue
))
return
QDateTime
();
if
(
std
::
isnan
(
inputValue
))
return
QDateTime
();
// Don't use Julian days here since support for years < 1 is bad
// Use 1900-01-01 instead
QDate
result_date
=
QDate
(
1900
,
1
,
1
).
addMonths
(
qRound
(
inputValue
-
1.0
));
...
...
src/backend/core/datatypes/Double2StringFilter.h
View file @
c9fcbd64
...
...
@@ -31,7 +31,7 @@
#include "../AbstractSimpleFilter.h"
#include <QLocale>
#include <
math.
h>
#include <
cmat
h>
//! Locale-aware conversion filter double -> QString.
class
Double2StringFilter
:
public
AbstractSimpleFilter
...
...
@@ -74,7 +74,7 @@ class Double2StringFilter : public AbstractSimpleFilter
if
(
!
m_inputs
.
value
(
0
))
return
QString
();
if
(
m_inputs
.
value
(
0
)
->
rowCount
()
<=
row
)
return
QString
();
double
inputValue
=
m_inputs
.
value
(
0
)
->
valueAt
(
row
);
if
(
isnan
(
inputValue
))
return
QString
();
if
(
std
::
isnan
(
inputValue
))
return
QString
();
return
QLocale
().
toString
(
inputValue
,
m_format
,
m_digits
);
}
...
...
src/backend/core/datatypes/Month2DoubleFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDate>
#include <
math.
h>
#include <
cmat
h>
/**
* \brief Conversion filter QDateTime -> double, translating dates into months (January -> 1).
...
...
src/backend/core/datatypes/String2DayOfWeekFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter String -> QDateTime, interpreting the input as days of the week (either numeric or "Mon" etc).
class
String2DayOfWeekFilter
:
public
AbstractSimpleFilter
...
...
src/backend/core/datatypes/String2DoubleFilter.h
View file @
c9fcbd64
...
...
@@ -31,7 +31,7 @@
#include "../AbstractSimpleFilter.h"
#include <QLocale>
#include <
math.
h>
#include <
cmat
h>
//! Locale-aware conversion filter QString -> double.
class
String2DoubleFilter
:
public
AbstractSimpleFilter
...
...
src/backend/core/datatypes/String2MonthFilter.h
View file @
c9fcbd64
...
...
@@ -32,7 +32,7 @@
#include "../AbstractSimpleFilter.h"
#include <QDateTime>
#include <
math.
h>
#include <
cmat
h>
//! Conversion filter String -> QDateTime, interpreting the input as months of the year (either numeric or "Jan" etc).
class
String2MonthFilter
:
public
AbstractSimpleFilter
...
...
src/backend/datapicker/ImageEditor.cpp
View file @
c9fcbd64
...
...
@@ -26,10 +26,10 @@
***************************************************************************/
#include "ImageEditor.h"
#include "math.h"
#include <QThreadPool>
#include <QElapsedTimer>
#include <QMutex>
#include <cmath>
// #include <QDebug>
static
const
QRgb
white
=
QColor
(
Qt
::
white
).
rgb
();
...
...
src/backend/datapicker/Transform.cpp
View file @
c9fcbd64
...
...
@@ -26,9 +26,7 @@
***************************************************************************/
#include "Transform.h"
#include "math.h"
#define PI 3.14159265
#include <cmath>
Transform
::
Transform
()
{
}
...
...
@@ -56,8 +54,8 @@ bool Transform::mapTypeToCartesian(const DatapickerImage::ReferencePoints& axisP
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
if
(
axisPoints
.
logicalPos
[
i
].
x
()
<
0
)
return
false
;
x
[
i
]
=
axisPoints
.
logicalPos
[
i
].
x
()
*
cos
(
axisPoints
.
logicalPos
[
i
].
y
()
*
PI
/
180.0
);
y
[
i
]
=
axisPoints
.
logicalPos
[
i
].
x
()
*
sin
(
axisPoints
.
logicalPos
[
i
].
y
()
*
PI
/
180.0
);
x
[
i
]
=
axisPoints
.
logicalPos
[
i
].
x
()
*
cos
(
axisPoints
.
logicalPos
[
i
].
y
()
*
M_
PI
/
180.0
);
y
[
i
]
=
axisPoints
.
logicalPos
[
i
].
x
()
*
sin
(
axisPoints
.
logicalPos
[
i
].
y
()
*
M_
PI
/
180.0
);
X
[
i
]
=
axisPoints
.
scenePos
[
i
].
x
();
Y
[
i
]
=
axisPoints
.
scenePos
[
i
].
y
();
}
...
...
@@ -138,7 +136,7 @@ QVector3D Transform::mapCartesianToType(const QPointF& point, const DatapickerIm
return
QVector3D
(
point
.
x
(),
exp
(
point
.
y
()),
0
);
}
else
if
(
axisPoints
.
type
==
DatapickerImage
::
PolarInDegree
)
{
double
r
=
sqrt
(
point
.
x
()
*
point
.
x
()
+
point
.
y
()
*
point
.
y
());
double
angle
=
atan
(
point
.
y
()
*
180
/
(
point
.
x
()
*
PI
));
double
angle
=
atan
(
point
.
y
()
*
180
/
(
point
.
x
()
*
M_
PI
));
return
QVector3D
(
r
,
angle
,
0
);
}
else
if
(
axisPoints
.
type
==
DatapickerImage
::
PolarInRadians
)
{
double
r
=
sqrt
(
point
.
x
()
*
point
.
x
()
+
point
.
y
()
*
point
.
y
());
...
...
src/backend/datasources/filters/BinaryFilter.cpp
View file @
c9fcbd64
...
...
@@ -29,12 +29,11 @@ Copyright : (C) 2015 by Stefan Gerlach (stefan.gerlach@uni.kn)
#include "backend/datasources/FileDataSource.h"
#include "backend/core/column/Column.h"
#include <math.h>
#include <QDataStream>
#include <QDebug>
#include <KLocale>
#include <kfilterdev.h>
#include <cmath>
/*!
\class BinaryFilter
...
...
src/backend/datasources/filters/HDFFilter.cpp
View file @
c9fcbd64
...
...
@@ -29,13 +29,12 @@ Copyright : (C) 2015 by Stefan Gerlach (stefan.gerlach@uni.kn)
#include "backend/datasources/FileDataSource.h"
#include "backend/core/column/Column.h"
#include <math.h>
#include <QFile>
#include <QTextStream>
#include <QDebug>
#include <KLocale>
#include <KIcon>
#include <cmath>
/*!
\class HDFFilter
...
...
src/backend/datasources/filters/ImageFilter.cpp
View file @
c9fcbd64
...
...
@@ -29,13 +29,13 @@ Copyright : (C) 2015 by Stefan Gerlach (stefan.gerlach@uni.kn)
#include "backend/datasources/FileDataSource.h"
#include "backend/core/column/Column.h"
#include <math.h>
#include <QFile>
#include <QTextStream>
#include <QDebug>
#include <KLocale>
#include <cmath>
/*!
\class ImageFilter
\brief Manages the import/export of data from/to an image file.
...
...
src/backend/datasources/filters/NetCDFFilter.cpp
View file @
c9fcbd64
...
...
@@ -29,13 +29,12 @@ Copyright : (C) 2015 by Stefan Gerlach (stefan.gerlach@uni.kn)
#include "backend/datasources/FileDataSource.h"
#include "backend/core/column/Column.h"
#include <math.h>
#include <QFile>
#include <QTextStream>
#include <QDebug>
#include <KLocale>
#include <KIcon>
#include <cmath>
/*!
\class NetCDFFilter
...
...
src/backend/gsl/ExpressionParser.cpp
View file @
c9fcbd64
...
...
@@ -3,8 +3,8 @@
Project : LabPlot
--------------------------------------------------------------------
Copyright : (C) 2014 Alexander Semke (alexander.semke@web.de)
(C) 2014 Stefan Gerlach (stefan.gerlach@uni.kn)
Description :
c
++ wrapper for the bison generated parser.
Copyright :
(C) 2014 Stefan Gerlach (stefan.gerlach@uni.kn)
Description :
C
++ wrapper for the bison generated parser.
***************************************************************************/
...
...
@@ -31,12 +31,14 @@
#include "backend/gsl/parser_extern.h"
#include "backend/gsl/parser_struct.h"
#include <klocale.h>
extern
"C"
{
#include <gsl/gsl_errno.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_const_mksa.h>
#include <gsl/gsl_const_num.h>
#include <klocale.h>
}
ExpressionParser
*
ExpressionParser
::
instance
=
NULL
;
...
...
src/backend/gsl/functions.h
View file @
c9fcbd64
...
...
@@ -3,8 +3,8 @@
Project : LabPlot
Description : definition of functions
--------------------------------------------------------------------
Copyright : (C) 2014 by Alexander Semke (alexander.semke@web.de)
Copyright : (C) 2014 by Stefan Gerlach (stefan.gerlach@uni-konstanz.de
)
Copyright : (C) 2014 by Alexander Semke (alexander.semke@web.de)
Copyright : (C) 2014 by Stefan Gerlach (stefan.gerlach@uni.kn
)
***************************************************************************/
...
...
src/backend/worksheet/Worksheet.cpp
View file @
c9fcbd64
...
...
@@ -35,16 +35,16 @@
#include "backend/lib/commandtemplates.h"
#include "backend/lib/XmlStreamReader.h"
#include "kdefrontend/worksheet/ExportWorksheetDialog.h"
#include <math.h>
#include <QPrinter>
#include <QPrintDialog>
#include <QPrintPreviewDialog>
#include
"KIcon"
#include
<KIcon>
#include <KConfigGroup>
#include <KLocale>
#include <QDebug>
#include <cmath>
/**
* \class Worksheet
...
...
src/backend/worksheet/plots/cartesian/Axis.cpp
View file @
c9fcbd64
...
...
@@ -51,9 +51,7 @@
#include <KLocale>
#include <cmath>
extern
"C"
{
#include <float.h>
}
#include <cfloat>
/**
* \class AxisGrid
...
...
@@ -1221,7 +1219,7 @@ void AxisPrivate::retransformTicks() {
}
}
else
{
majorTickPos
=
majorTicksColumn
->
valueAt
(
iMajor
);
if
(
isnan
(
majorTickPos
))
if
(
std
::
isnan
(
majorTickPos
))
break
;
//stop iterating after the first non numerical value in the column
}
...
...
@@ -1276,7 +1274,7 @@ void AxisPrivate::retransformTicks() {
minorTickPos
=
majorTickPos
+
(
iMinor
+
1
)
*
minorTicksSpacing
;
}
else
{
minorTickPos
=
minorTicksColumn
->
valueAt
(
iMinor
);
if
(
isnan
(
minorTickPos
))
if
(
std
::
isnan
(
minorTickPos
))
break
;
//stop iterating after the first non numerical value in the column
//in the case a custom column is used for the minor ticks, we draw them _once_ for the whole range of the axis.
...
...
src/backend/worksheet/plots/cartesian/CartesianCoordinateSystem.cpp
View file @
c9fcbd64
...
...
@@ -558,7 +558,7 @@ QList<QLineF> CartesianCoordinateSystem::mapLogicalToScene(const QList<QLineF> &
if
(
flags
&
MarkGaps
)
{
if
(
!
isnan
(
xGapBefore
))
{
if
(
!
std
::
isnan
(
xGapBefore
))
{
if
(
clipResult
.
xClippedLeft
[
0
])
{
QLineF
gapMarker
(
QPointF
(
x1
+
xGapBefore
/
4
,
y1
-
xGapBefore
/
2
),
QPointF
(
x1
-
xGapBefore
/
4
,
y1
+
xGapBefore
/
2
));
...
...
@@ -573,7 +573,7 @@ QList<QLineF> CartesianCoordinateSystem::mapLogicalToScene(const QList<QLineF> &
}
}
if
(
!
isnan
(
xGapAfter
))
{
if
(
!
std
::
isnan
(
xGapAfter
))
{
if
(
clipResult
.
xClippedRight
[
0
])
{
QLineF
gapMarker
(
QPointF
(
x1
+
xGapAfter
/
4
,
y1
-
xGapAfter
/
2
),
QPointF
(
x1
-
xGapAfter
/
4
,
y1
+
xGapAfter
/
2
));
...
...
@@ -588,7 +588,7 @@ QList<QLineF> CartesianCoordinateSystem::mapLogicalToScene(const QList<QLineF> &
}
}
if
(
!
isnan
(
yGapBefore
))
{
if
(
!
std
::
isnan
(
yGapBefore
))
{
if
(
clipResult
.
yClippedTop
[
0
])
{
QLineF
gapMarker
(
QPointF
(
x1
+
yGapBefore
/
2
,
y1
-
yGapBefore
/
4
),
QPointF
(
x1
-
yGapBefore
/
2
,
y1
+
yGapBefore
/
4
));
...
...
@@ -603,7 +603,7 @@ QList<QLineF> CartesianCoordinateSystem::mapLogicalToScene(const QList<QLineF> &
}
}
if
(
!
isnan
(
yGapAfter
))
{
if
(
!
std
::
isnan
(
yGapAfter
))
{
if
(
clipResult
.
yClippedBottom
[
0
])
{
QLineF
gapMarker
(
QPointF
(
x1
+
yGapAfter
/
2
,
y1
-
yGapAfter
/
4
),
QPointF
(
x1
-
yGapAfter
/
2
,
y1
+
yGapAfter
/
4
));
...
...
src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
View file @
c9fcbd64
...
...
@@ -1283,7 +1283,7 @@ void CartesianPlotPrivate::retransformScales() {
bool
hasValidBreak
=
false
;
if
(
xRangeBreakingEnabled
&&
!
xRangeBreaks
.
list
.
isEmpty
())
{
foreach
(
const
CartesianPlot
::
RangeBreak
&
b
,
xRangeBreaks
.
list
)
hasValidBreak
=
(
!
isnan
(
b
.
start
)
&&
!
isnan
(
b
.
end
));
hasValidBreak
=
(
!
std
::
isnan
(
b
.
start
)
&&
!
std
::
isnan
(
b
.
end
));
}
//create x-scales
...
...
@@ -1329,7 +1329,7 @@ void CartesianPlotPrivate::retransformScales() {
hasValidBreak
=
false
;
if
(
yRangeBreakingEnabled
&&
!
yRangeBreaks
.
list
.
isEmpty
())
{
foreach
(
const
CartesianPlot
::
RangeBreak
&
b
,
yRangeBreaks
.
list
)
hasValidBreak
=
(
!
isnan
(
b
.
start
)
&&
!
isnan
(
b
.
end
));
hasValidBreak
=
(
!
std
::
isnan
(
b
.
start
)
&&
!
std
::
isnan
(
b
.
end
));
}
//create y-scales
...
...
src/backend/worksheet/plots/cartesian/XYSmoothCurve.cpp
View file @
c9fcbd64
...
...
@@ -219,7 +219,7 @@ void XYSmoothCurvePrivate::recalculate() {
QVector
<
double
>
ydataVector
;
for
(
int
row
=
0
;
row
<
xDataColumn
->
rowCount
();
++
row
)
{
//only copy those data where _all_ values (for x and y, if given) are valid
if
(
!
isnan
(
xDataColumn
->
valueAt
(
row
))
&&
!
isnan
(
yDataColumn
->
valueAt
(
row
))
if
(
!
std
::
isnan
(
xDataColumn
->
valueAt
(
row
))
&&
!
std
::
isnan
(
yDataColumn
->
valueAt
(
row
))
&&
!
xDataColumn
->
isMasked
(
row
)
&&
!
yDataColumn
->
isMasked
(
row
))
{
xdataVector
.
append
(
xDataColumn
->
valueAt
(
row
));
...
...
src/commonfrontend/matrix/MatrixView.cpp
View file @
c9fcbd64
...
...
@@ -59,8 +59,8 @@
#include <KAction>
#include <KIcon>
#include <
float.h
>
#include
"math.h"
#include <
cfloat
>
#include
<cmath>
MatrixView
::
MatrixView
(
Matrix
*
matrix
)
:
QWidget
(),
m_stackedWidget
(
new
QStackedWidget
(
this
)),
...
...
src/kdefrontend/spreadsheet/StatisticsDialog.cpp
View file @
c9fcbd64
...
...
@@ -178,7 +178,7 @@ void StatisticsDialog::setColumns(const QList<Column*>& columns) {
}
const
QString
StatisticsDialog
::
isNanValue
(
const
double
value
)
{
return
(
isnan
(
value
)
?
i18n
(
"The value couldn't be calculated."
)
:
QString
::
number
(
value
,
'g'
,
10
));
return
(
std
::
isnan
(
value
)
?
i18n
(
"The value couldn't be calculated."
)
:
QString
::
number
(
value
,
'g'
,
10
));
}
QSize
StatisticsDialog
::
sizeHint
()
const
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment