Simplify some rtl::math::approxEqual calls

Comparing with zero is simple - the implementation special-zases zero.

Change-Id: Ia2fe8a1100941f72023a74955ebfbb4f5f25b90d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164540
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2024-03-07 15:54:32 +02:00
parent e35e76924d
commit d98f71fb6b
2 changed files with 2 additions and 2 deletions

View File

@ -331,7 +331,7 @@ namespace drawinglayer::primitive2d
// direction has to be equal -> cross product == 0.0
const basegfx::B2DVector aVT(pCandidateA->getEnd() - pCandidateA->getStart());
const basegfx::B2DVector aVC(pCandidateB->getEnd() - pCandidateB->getStart());
if(!rtl::math::approxEqual(0.0, aVC.cross(aVT)))
if(aVC.cross(aVT) != 0)
{
return Primitive2DReference();
}

View File

@ -459,7 +459,7 @@ void OutputDevice::DrawTransformedBitmapEx(
if(rBitmapEx.IsEmpty())
return;
if(rtl::math::approxEqual( fAlpha, 0.0 ))
if( fAlpha == 0.0 )
return;
// MM02 compared to other public methods of OutputDevice