Skip to content

Commit f2b2c6d

Browse files
committed
Use fabs/abs/labs instead of qAbs
Better to stick to standard methods where available instead of less supported Qt methods
1 parent 4b009f9 commit f2b2c6d

File tree

71 files changed

+671
-670
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+671
-670
lines changed

src/analysis/interpolation/MathUtils.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ double MathUtils::distPointFromLine( QgsPoint *thepoint, QgsPoint *p1, QgsPoint
210210
double a = normal.getX();
211211
double b = normal.getY();
212212
double c = -( normal.getX() * p2->x() + normal.getY() * p2->y() );
213-
double distance = qAbs( ( a * thepoint->x() + b * thepoint->y() + c ) / ( sqrt( a * a + b * b ) ) );
213+
double distance = fabs( ( a * thepoint->x() + b * thepoint->y() + c ) / ( sqrt( a * a + b * b ) ) );
214214
return distance;
215215
}
216216
else
@@ -471,7 +471,7 @@ double MathUtils::power( double a, int b )
471471
return 1;
472472
}
473473
double tmp = a;
474-
for ( int i = 2; i <= qAbs( ( double )b ); i++ )
474+
for ( int i = 2; i <= abs( b ); i++ )
475475
{
476476

477477
a *= tmp;

src/analysis/raster/qgsalignraster.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030

3131
static double ceil_with_tolerance( double value )
3232
{
33-
if ( qAbs( value - std::round( value ) ) < 1e-6 )
33+
if ( fabs( value - std::round( value ) ) < 1e-6 )
3434
return std::round( value );
3535
else
3636
return qCeil( value );
3737
}
3838

3939
static double floor_with_tolerance( double value )
4040
{
41-
if ( qAbs( value - std::round( value ) ) < 1e-6 )
41+
if ( fabs( value - std::round( value ) ) < 1e-6 )
4242
return std::round( value );
4343
else
4444
return qFloor( value );
@@ -538,7 +538,7 @@ bool QgsAlignRaster::suggestedWarpOutput( const QgsAlignRaster::RasterInfo &info
538538
if ( eErr != CE_None )
539539
return false;
540540

541-
QSizeF cs( qAbs( adfDstGeoTransform[1] ), qAbs( adfDstGeoTransform[5] ) );
541+
QSizeF cs( fabs( adfDstGeoTransform[1] ), fabs( adfDstGeoTransform[5] ) );
542542

543543
if ( rect )
544544
*rect = QgsRectangle( extents[0], extents[1], extents[2], extents[3] );
@@ -582,7 +582,7 @@ QgsAlignRaster::RasterInfo::~RasterInfo()
582582

583583
QSizeF QgsAlignRaster::RasterInfo::cellSize() const
584584
{
585-
return QSizeF( qAbs( mGeoTransform[1] ), qAbs( mGeoTransform[5] ) );
585+
return QSizeF( fabs( mGeoTransform[1] ), fabs( mGeoTransform[5] ) );
586586
}
587587

588588
QPointF QgsAlignRaster::RasterInfo::gridOffset() const

src/analysis/raster/qgsrelief.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ bool QgsRelief::processNineCellWindow( float *x1, float *x2, float *x3, float *x
353353
float aspect = mAspectFilter->processNineCellWindow( x1, x2, x3, x4, x5, x6, x7, x8, x9 );
354354
if ( hillShadeValue285 != mOutputNodataValue && aspect != mOutputNodataValue )
355355
{
356-
double angle_diff = qAbs( 285 - aspect );
356+
double angle_diff = fabs( 285 - aspect );
357357
if ( angle_diff > 180 )
358358
{
359359
angle_diff -= 180;

src/analysis/vector/qgsgeometrysnapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ class Raytracer
110110
// See http://playtechs.blogspot.ch/2007/03/raytracing-on-grid.html
111111
public:
112112
Raytracer( float x0, float y0, float x1, float y1 )
113-
: m_dx( qAbs( x1 - x0 ) )
114-
, m_dy( qAbs( y1 - y0 ) )
113+
: m_dx( fabs( x1 - x0 ) )
114+
, m_dy( fabs( y1 - y0 ) )
115115
, m_x( qFloor( x0 ) )
116116
, m_y( qFloor( y0 ) )
117117
, m_n( 1 )

src/app/qgsdecorationscalebar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ void QgsDecorationScaleBar::render( const QgsMapSettings &mapSettings, QgsRender
113113
//Get map units per pixel. This can be negative at times (to do with
114114
//projections) and that just confuses the rest of the code in this
115115
//function, so force to a positive number.
116-
double myMapUnitsPerPixelDouble = qAbs( context.mapToPixel().mapUnitsPerPixel() );
116+
double myMapUnitsPerPixelDouble = fabs( context.mapToPixel().mapUnitsPerPixel() );
117117
double myActualSize = mPreferredSize;
118118

119119
// Exit if the canvas width is 0 or layercount is 0 or QGIS will freeze

src/app/qgslabelinggui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ void QgsLabelingGui::setLayer( QgsMapLayer *mapLayer )
237237
// curved label max character angles
238238
mMaxCharAngleInDSpinBox->setValue( lyr.maxCurvedCharAngleIn );
239239
// lyr.maxCurvedCharAngleOut must be negative, but it is shown as positive spinbox in GUI
240-
mMaxCharAngleOutDSpinBox->setValue( qAbs( lyr.maxCurvedCharAngleOut ) );
240+
mMaxCharAngleOutDSpinBox->setValue( fabs( lyr.maxCurvedCharAngleOut ) );
241241

242242
wrapCharacterEdit->setText( lyr.wrapChar );
243243
mFontMultiLineAlignComboBox->setCurrentIndex( ( unsigned int ) lyr.multilineAlign );

src/app/qgsmaptoolmeasureangle.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ void QgsMapToolMeasureAngle::canvasMoveEvent( QgsMapMouseEvent *e )
6464
double azimuthOne = mDa.bearing( mAnglePoints.at( 1 ), mAnglePoints.at( 0 ) );
6565
double azimuthTwo = mDa.bearing( mAnglePoints.at( 1 ), point );
6666
double resultAngle = azimuthTwo - azimuthOne;
67-
QgsDebugMsg( QString::number( qAbs( resultAngle ) ) );
67+
QgsDebugMsg( QString::number( fabs( resultAngle ) ) );
6868
QgsDebugMsg( QString::number( M_PI ) );
69-
if ( qAbs( resultAngle ) > M_PI )
69+
if ( fabs( resultAngle ) > M_PI )
7070
{
7171
if ( resultAngle < 0 )
7272
{

src/app/qgsundowidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void QgsUndoWidget::indexChanged( int curIndx )
7878
canRedo = mUndoStack->canRedo();
7979
curCount = mUndoStack->count();
8080
}
81-
int offset = qAbs( mPreviousIndex - curIndx );
81+
int offset = abs( mPreviousIndex - curIndx );
8282

8383
// when individually redoing, differentiate between last redo and a new command added to stack
8484
bool lastRedo = ( mPreviousIndex == ( mPreviousCount - 1 ) && mPreviousCount == curCount && !canRedo );

src/core/composer/qgscomposerarrow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void QgsComposerArrow::adaptItemSceneRect()
409409
{
410410
//rectangle containing start and end point
411411
QRectF rect = QRectF( qMin( mStartPoint.x(), mStopPoint.x() ), qMin( mStartPoint.y(), mStopPoint.y() ),
412-
qAbs( mStopPoint.x() - mStartPoint.x() ), qAbs( mStopPoint.y() - mStartPoint.y() ) );
412+
fabs( mStopPoint.x() - mStartPoint.x() ), fabs( mStopPoint.y() - mStartPoint.y() ) );
413413
double enlarge = computeMarkerMargin();
414414
rect.adjust( -enlarge, -enlarge, enlarge, enlarge );
415415
QgsComposerItem::setSceneRect( rect );

src/core/composer/qgscomposermapgrid.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,11 +1465,11 @@ QString QgsComposerMapGrid::gridAnnotationString( double value, QgsComposerMapGr
14651465
if ( geographic )
14661466
{
14671467
//insert degree symbol for geographic coordinates
1468-
return QString::number( qAbs( value ), 'f', mGridAnnotationPrecision ) + QChar( 176 ) + hemisphere;
1468+
return QString::number( fabs( value ), 'f', mGridAnnotationPrecision ) + QChar( 176 ) + hemisphere;
14691469
}
14701470
else
14711471
{
1472-
return QString::number( qAbs( value ), 'f', mGridAnnotationPrecision ) + hemisphere;
1472+
return QString::number( fabs( value ), 'f', mGridAnnotationPrecision ) + hemisphere;
14731473
}
14741474
}
14751475
else if ( mGridAnnotationFormat == CustomFormat )

src/core/composer/qgscomposermousehandles.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ void QgsComposerMouseHandles::mouseReleaseEvent( QGraphicsSceneMouseEvent *event
593593
double diffY = mouseMoveStopPoint.y() - mMouseMoveStartPos.y();
594594

595595
//it was only a click
596-
if ( qAbs( diffX ) < std::numeric_limits<double>::min() && qAbs( diffY ) < std::numeric_limits<double>::min() )
596+
if ( fabs( diffX ) < std::numeric_limits<double>::min() && fabs( diffY ) < std::numeric_limits<double>::min() )
597597
{
598598
mIsDragging = false;
599599
mIsResizing = false;
@@ -824,7 +824,7 @@ void QgsComposerMouseHandles::dragMouseMove( QPointF currentPosition, bool lockM
824824
{
825825
//constrained (shift) moving should lock to horizontal/vertical movement
826826
//reset the smaller of the x/y movements
827-
if ( qAbs( moveRectX ) <= qAbs( moveRectY ) )
827+
if ( fabs( moveRectX ) <= fabs( moveRectY ) )
828828
{
829829
moveRectX = 0;
830830
}

src/core/composer/qgscomposernodesitem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,
7777

7878
double distance = std::numeric_limits<double>::max();
7979
if ( qIsInf( coef ) )
80-
distance = qAbs( pt1.x() - start.x() );
80+
distance = fabs( pt1.x() - start.x() );
8181
else
8282
{
8383
const double coef2 = ( -1 / coef );
@@ -86,7 +86,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,
8686
QPointF inter;
8787
if ( qIsInf( coef2 ) )
8888
{
89-
distance = qAbs( pt1.y() - start.y() );
89+
distance = fabs( pt1.y() - start.y() );
9090
inter.setX( start.x() );
9191
inter.setY( pt1.y() );
9292
}
@@ -104,7 +104,7 @@ bool QgsComposerNodesItem::addNode( QPointF pt,
104104
const double length3 = computeDistance( pt1, pt2 );
105105
const double length4 = length1 + length2;
106106

107-
if ( qAbs( length3 - length4 ) < std::numeric_limits<float>::epsilon() )
107+
if ( fabs( length3 - length4 ) < std::numeric_limits<float>::epsilon() )
108108
distance = computeDistance( inter, start );
109109
}
110110

src/core/composer/qgscomposerpicture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ void QgsComposerPicture::setSceneRect( const QRectF &rectangle )
578578

579579
//if height has changed more than width, then fix width and set height correspondingly
580580
//else, do the opposite
581-
if ( qAbs( rect().width() - rectangle.width() ) <
582-
qAbs( rect().height() - rectangle.height() ) )
581+
if ( fabs( rect().width() - rectangle.width() ) <
582+
fabs( rect().height() - rectangle.height() ) )
583583
{
584584
newRect.setHeight( targetImageSize.height() * newRect.width() / targetImageSize.width() );
585585
}

src/core/dxf/qgsdxfpaintengine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ double QgsDxfPaintEngine::power( double a, int b )
262262
return 1;
263263

264264
double tmp = a;
265-
for ( int i = 2; i <= qAbs( static_cast< double >( b ) ); i++ )
265+
for ( int i = 2; i <= abs( b ); i++ )
266266
a *= tmp;
267267

268268
if ( b > 0 )

src/core/effects/qgsimageoperation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,8 @@ QRect QgsImageOperation::nonTransparentImageRect( const QImage &image, QSize min
889889
if ( center )
890890
{
891891
// recompute min and max to center image
892-
const int dx = qMax( qAbs( xmax - width / 2 ), qAbs( xmin - width / 2 ) );
893-
const int dy = qMax( qAbs( ymax - height / 2 ), qAbs( ymin - height / 2 ) );
892+
const int dx = qMax( abs( xmax - width / 2 ), abs( xmin - width / 2 ) );
893+
const int dy = qMax( abs( ymax - height / 2 ), abs( ymin - height / 2 ) );
894894
xmin = qMax( 0, width / 2 - dx );
895895
xmax = qMin( width, width / 2 + dx );
896896
ymin = qMax( 0, height / 2 - dy );

src/core/expression/qgsexpressionfunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,13 +1007,13 @@ static QVariant fcnWordwrap( const QVariantList &values, const QgsExpressionCont
10071007
if ( strhit == lasthit || strhit == -1 )
10081008
{
10091009
//if no new backward delimiter found, try to locate forward
1010-
strhit = lines[i].indexOf( rx, strcurrent + qAbs( wrap ) );
1010+
strhit = lines[i].indexOf( rx, strcurrent + labs( wrap ) );
10111011
}
10121012
lasthit = strhit;
10131013
}
10141014
else
10151015
{
1016-
strhit = lines[i].indexOf( rx, strcurrent + qAbs( wrap ) );
1016+
strhit = lines[i].indexOf( rx, strcurrent + labs( wrap ) );
10171017
}
10181018
if ( strhit > -1 )
10191019
{

src/core/geometry/qgscircle.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,24 @@ static bool isPerpendicular( const QgsPoint &pt1, const QgsPoint &pt2, const Qgs
5252
double yDelta_b = pt3.y() - pt2.y();
5353
double xDelta_b = pt3.x() - pt2.x();
5454

55-
if ( ( qAbs( xDelta_a ) <= epsilon ) && ( qAbs( yDelta_b ) <= epsilon ) )
55+
if ( ( fabs( xDelta_a ) <= epsilon ) && ( fabs( yDelta_b ) <= epsilon ) )
5656
{
5757
return false;
5858
}
5959

60-
if ( qAbs( yDelta_a ) <= epsilon )
60+
if ( fabs( yDelta_a ) <= epsilon )
6161
{
6262
return true;
6363
}
64-
else if ( qAbs( yDelta_b ) <= epsilon )
64+
else if ( fabs( yDelta_b ) <= epsilon )
6565
{
6666
return true;
6767
}
68-
else if ( qAbs( xDelta_a ) <= epsilon )
68+
else if ( fabs( xDelta_a ) <= epsilon )
6969
{
7070
return true;
7171
}
72-
else if ( qAbs( xDelta_b ) <= epsilon )
72+
else if ( fabs( xDelta_b ) <= epsilon )
7373
{
7474
return true;
7575
}
@@ -138,7 +138,7 @@ QgsCircle QgsCircle::from3Points( const QgsPoint &pt1, const QgsPoint &pt2, cons
138138
double aSlope = yDelta_a / xDelta_a;
139139
double bSlope = yDelta_b / xDelta_b;
140140

141-
if ( ( qAbs( xDelta_a ) <= epsilon ) && ( qAbs( yDelta_b ) <= epsilon ) )
141+
if ( ( fabs( xDelta_a ) <= epsilon ) && ( fabs( yDelta_b ) <= epsilon ) )
142142
{
143143
center.setX( 0.5 * ( p2.x() + p3.x() ) );
144144
center.setY( 0.5 * ( p1.y() + p2.y() ) );
@@ -147,7 +147,7 @@ QgsCircle QgsCircle::from3Points( const QgsPoint &pt1, const QgsPoint &pt2, cons
147147
return QgsCircle( center, radius );
148148
}
149149

150-
if ( qAbs( aSlope - bSlope ) <= epsilon )
150+
if ( fabs( aSlope - bSlope ) <= epsilon )
151151
{
152152
return QgsCircle();
153153
}
@@ -191,8 +191,8 @@ QgsCircle QgsCircle::from3Tangents( const QgsPoint &pt1_tg1, const QgsPoint &pt2
191191

192192
QgsCircle QgsCircle::fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 )
193193
{
194-
double delta_x = qAbs( pt1.x() - pt2.x() );
195-
double delta_y = qAbs( pt1.x() - pt2.y() );
194+
double delta_x = fabs( pt1.x() - pt2.x() );
195+
double delta_y = fabs( pt1.x() - pt2.y() );
196196
if ( !qgsDoubleNear( delta_x, delta_y ) )
197197
{
198198
return QgsCircle();

src/core/geometry/qgscircle.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
133133
*/
134134
void setSemiMajorAxis( const double semiMajorAxis ) override
135135
{
136-
mSemiMajorAxis = qAbs( semiMajorAxis );
136+
mSemiMajorAxis = fabs( semiMajorAxis );
137137
mSemiMinorAxis = mSemiMajorAxis;
138138
}
139139

@@ -143,7 +143,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
143143
*/
144144
void setSemiMinorAxis( const double semiMinorAxis ) override
145145
{
146-
mSemiMajorAxis = qAbs( semiMinorAxis );
146+
mSemiMajorAxis = fabs( semiMinorAxis );
147147
mSemiMinorAxis = mSemiMajorAxis;
148148
}
149149

@@ -152,7 +152,7 @@ class CORE_EXPORT QgsCircle : public QgsEllipse
152152
//! Set the radius of the circle
153153
void setRadius( double radius )
154154
{
155-
mSemiMajorAxis = qAbs( radius );
155+
mSemiMajorAxis = fabs( radius );
156156
mSemiMinorAxis = mSemiMajorAxis;
157157
}
158158

src/core/geometry/qgscurvepolygon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ double QgsCurvePolygon::area() const
370370
{
371371
double area = 0.0;
372372
mExteriorRing->sumUpArea( area );
373-
totalArea += qAbs( area );
373+
totalArea += fabs( area );
374374
}
375375

376376
QList<QgsCurve *>::const_iterator ringIt = mInteriorRings.constBegin();
@@ -380,7 +380,7 @@ double QgsCurvePolygon::area() const
380380
if ( ( *ringIt )->isRing() )
381381
{
382382
( *ringIt )->sumUpArea( area );
383-
totalArea -= qAbs( area );
383+
totalArea -= fabs( area );
384384
}
385385
}
386386
return totalArea;

src/core/geometry/qgsellipse.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
void QgsEllipse::normalizeAxis()
2727
{
28-
mSemiMajorAxis = qAbs( mSemiMajorAxis );
29-
mSemiMinorAxis = qAbs( mSemiMinorAxis );
28+
mSemiMajorAxis = fabs( mSemiMajorAxis );
29+
mSemiMinorAxis = fabs( mSemiMinorAxis );
3030
if ( mSemiMajorAxis < mSemiMinorAxis )
3131
{
3232
std::swap( mSemiMajorAxis, mSemiMinorAxis );
@@ -72,17 +72,17 @@ QgsEllipse QgsEllipse::fromFoci( const QgsPoint &pt1, const QgsPoint &pt2, const
7272
QgsEllipse QgsEllipse::fromExtent( const QgsPoint &pt1, const QgsPoint &pt2 )
7373
{
7474
QgsPoint center = QgsGeometryUtils::midpoint( pt1, pt2 );
75-
double axis_a = qAbs( pt2.x() - pt1.x() ) / 2.0;
76-
double axis_b = qAbs( pt2.y() - pt1.y() ) / 2.0;
75+
double axis_a = fabs( pt2.x() - pt1.x() ) / 2.0;
76+
double axis_b = fabs( pt2.y() - pt1.y() ) / 2.0;
7777
double azimuth = 90.0;
7878

7979
return QgsEllipse( center, axis_a, axis_b, azimuth );
8080
}
8181

8282
QgsEllipse QgsEllipse::fromCenterPoint( const QgsPoint &center, const QgsPoint &pt1 )
8383
{
84-
double axis_a = qAbs( pt1.x() - center.x() );
85-
double axis_b = qAbs( pt1.y() - center.y() );
84+
double axis_a = fabs( pt1.x() - center.x() );
85+
double axis_b = fabs( pt1.y() - center.y() );
8686
double azimuth = 90.0;
8787

8888
return QgsEllipse( center, axis_a, axis_b, azimuth );

src/core/geometry/qgsgeometry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,7 @@ QgsLineString *smoothCurve( const QgsLineString &line, const unsigned int iterat
25582558
QgsPoint p3 = result->pointN( 1 );
25592559
double angle = QgsGeometryUtils::angleBetweenThreePoints( p1.x(), p1.y(), p2.x(), p2.y(),
25602560
p3.x(), p3.y() );
2561-
angle = qAbs( M_PI - angle );
2561+
angle = fabs( M_PI - angle );
25622562
skipFirst = angle > maxAngleRads;
25632563
}
25642564
for ( int i = 0; i < result->numPoints() - 1; i++ )

src/core/geometry/qgsinternalgeometryengine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ QgsGeometry QgsInternalGeometryEngine::poleOfInaccessibility( double precision,
290290

291291
bool dotProductWithinAngleTolerance( double dotProduct, double lowerThreshold, double upperThreshold )
292292
{
293-
return lowerThreshold > qAbs( dotProduct ) || qAbs( dotProduct ) > upperThreshold;
293+
return lowerThreshold > fabs( dotProduct ) || fabs( dotProduct ) > upperThreshold;
294294
}
295295

296296
double normalizedDotProduct( const QgsPoint &a, const QgsPoint &b, const QgsPoint &c )
@@ -341,7 +341,7 @@ double squareness( QgsLineString *ring, double lowerThreshold, double upperThres
341341
if ( !dotProductWithinAngleTolerance( dotProduct, lowerThreshold, upperThreshold ) )
342342
continue;
343343

344-
sum += 2.0 * qMin( qAbs( dotProduct - 1.0 ), qMin( qAbs( dotProduct ), qAbs( dotProduct + 1 ) ) );
344+
sum += 2.0 * qMin( fabs( dotProduct - 1.0 ), qMin( fabs( dotProduct ), fabs( dotProduct + 1 ) ) );
345345
}
346346
a = b;
347347
b = c;

0 commit comments

Comments
 (0)