mirror of
https://github.com/LibreOffice/core.git
synced 2025-07-29 21:00:46 +00:00
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:
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user