diff options
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/source/polygon/b3dpolypolygontools.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx index 3badd683d248..ad2dd5bb7979 100644 --- a/basegfx/source/polygon/b3dpolypolygontools.cxx +++ b/basegfx/source/polygon/b3dpolypolygontools.cxx @@ -221,7 +221,7 @@ namespace basegfx::utils } // min/max limitations - nHorSeg = std::min(nMaxSegments, std::max(nMinSegments, nHorSeg)); + nHorSeg = std::clamp(nHorSeg, nMinSegments, nMaxSegments); if(!nVerSeg) { @@ -229,7 +229,7 @@ namespace basegfx::utils } // min/max limitations - nVerSeg = std::min(nMaxSegments, std::max(nMinSegments, nVerSeg)); + nVerSeg = std::clamp(nVerSeg, nMinSegments, nMaxSegments); // create constants const double fVerDiffPerStep((fVerStop - fVerStart) / static_cast<double>(nVerSeg)); @@ -320,7 +320,7 @@ namespace basegfx::utils } // min/max limitations - nHorSeg = std::min(nMaxSegments, std::max(nMinSegments, nHorSeg)); + nHorSeg = std::clamp(nHorSeg, nMinSegments, nMaxSegments); if(!nVerSeg) { @@ -328,7 +328,7 @@ namespace basegfx::utils } // min/max limitations - nVerSeg = std::min(nMaxSegments, std::max(nMinSegments, nVerSeg)); + nVerSeg = std::clamp(nVerSeg, nMinSegments, nMaxSegments); // vertical loop for(sal_uInt32 a(0); a < nVerSeg; a++) |