Commit 3d0e377c authored by Boudewijn Rempt's avatar Boudewijn Rempt

Use std::isnan instead of bare isnan

Patch by Pierre Geier.
BUG:396298
parent af6febcd
...@@ -100,7 +100,7 @@ void KisGaussRectangleMaskGenerator::setScale(qreal scaleX, qreal scaleY) ...@@ -100,7 +100,7 @@ void KisGaussRectangleMaskGenerator::setScale(qreal scaleX, qreal scaleY)
d->halfHeight = height * 0.5 - 2.5 * yfade; d->halfHeight = height * 0.5 - 2.5 * yfade;
d->alphafactor = 255.0 / (4.0 * erf(d->halfWidth * d->xfade) * erf(d->halfHeight * d->yfade)); d->alphafactor = 255.0 / (4.0 * erf(d->halfWidth * d->xfade) * erf(d->halfHeight * d->yfade));
if (isnan(d->alphafactor)) d->alphafactor = 0.0f; // erf can return nan if ratio is 0 if (std::isnan(d->alphafactor)) d->alphafactor = 0.0f; // erf can return nan if ratio is 0
d->fadeMaker.setLimits(0.5 * width, 0.5 * height); d->fadeMaker.setLimits(0.5 * width, 0.5 * height);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment