diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-03 13:05:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-03 21:57:23 +0200 |
commit | 81302f33073e7629d724ed269f1fa21dad29e141 (patch) | |
tree | 59c1a5422fee301751c170e6ea24a3ca9b0caddc /svx/source/svdraw | |
parent | 83b25e4b9fa8f95c24759a64f8cb9716ee34a4a3 (diff) |
Move angle normalization code from various places to tools
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that
deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000;
NormAngle360 -> NormAngle36000.
Some places were fixed that previously returned inclusive ranges (i.e., both 0
and 360), see changes in these files:
chart2/source/view/main/PlottingPositionHelper.cxx
chart2/source/view/main/PolarLabelPositionHelper.cxx
chart2/source/view/main/ShapeFactory.cxx
filter/source/graphicfilter/idxf/dxf2mtf.cxx
sw/source/core/graphic/grfatr.cxx
(the latter now matches the comment in the function).
Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59
Reviewed-on: https://gerrit.libreoffice.org/58556
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svddrgmt.cxx | 34 | ||||
-rw-r--r-- | svx/source/svdraw/svdglue.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdhdl.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdocirc.cxx | 24 | ||||
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 18 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxtr.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdtrans.cxx | 10 |
10 files changed, 56 insertions, 57 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index 2bc2c74e49e5..d826a2f12422 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -1037,12 +1037,12 @@ void SdrDragMovHdl::MoveSdrDrag(const Point& rNoSnapPnt) if (pH!=nullptr) { Point aRef(pH->GetPos()); - long nAngle=NormAngle360(GetAngle(aPnt-aRef)); + long nAngle=NormAngle36000(GetAngle(aPnt-aRef)); long nNewAngle=nAngle; nNewAngle+=nSA/2; nNewAngle/=nSA; nNewAngle*=nSA; - nNewAngle=NormAngle360(nNewAngle); + nNewAngle=NormAngle36000(nNewAngle); double a=(nNewAngle-nAngle)*nPi180; double nSin=sin(a); double nCos=cos(a); @@ -2061,7 +2061,7 @@ void SdrDragRotate::TakeSdrDragComment(OUString& rStr) const { ImpTakeDescriptionStr(STR_DragMethRotate, rStr); rStr += " ("; - sal_Int32 nTmpAngle(NormAngle360(nAngle)); + sal_Int32 nTmpAngle(NormAngle36000(nAngle)); if(bRight && nAngle) { @@ -2114,7 +2114,7 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_) Point aPnt(rPnt_); if (DragStat().CheckMinMoved(aPnt)) { - long nNewAngle=NormAngle360(GetAngle(aPnt-DragStat().GetRef1())-nAngle0); + long nNewAngle=NormAngle36000(GetAngle(aPnt-DragStat().GetRef1())-nAngle0); long nSA=0; if (getSdrDragView().IsAngleSnapEnabled()) @@ -2130,7 +2130,7 @@ void SdrDragRotate::MoveSdrDrag(const Point& rPnt_) nNewAngle*=nSA; } - nNewAngle=NormAngle180(nNewAngle); + nNewAngle=NormAngle18000(nNewAngle); if (nAngle!=nNewAngle) { @@ -2207,7 +2207,7 @@ void SdrDragShear::TakeSdrDragComment(OUString& rStr) const if(bUpSideDown) nTmpAngle += 18000; - nTmpAngle = NormAngle180(nTmpAngle); + nTmpAngle = NormAngle18000(nTmpAngle); rStr += SdrModel::GetAngleString(nTmpAngle) + ")"; @@ -2305,20 +2305,20 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt) if (bSlant) { - nNewAngle=NormAngle180(-(GetAngle(aDif)-nAngle0)); + nNewAngle=NormAngle18000(-(GetAngle(aDif)-nAngle0)); if (bVertical) - nNewAngle=NormAngle180(-nNewAngle); + nNewAngle=NormAngle18000(-nNewAngle); } else { if (bVertical) - nNewAngle=NormAngle180(GetAngle(aDif)); + nNewAngle=NormAngle18000(GetAngle(aDif)); else - nNewAngle=NormAngle180(-(GetAngle(aDif)-9000)); + nNewAngle=NormAngle18000(-(GetAngle(aDif)-9000)); if (nNewAngle<-9000 || nNewAngle>9000) - nNewAngle=NormAngle180(nNewAngle+18000); + nNewAngle=NormAngle18000(nNewAngle+18000); if (bResize) { @@ -2350,7 +2350,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt) nNewAngle*=nSA; } - nNewAngle=NormAngle360(nNewAngle); + nNewAngle=NormAngle36000(nNewAngle); bUpSideDown=nNewAngle>9000 && nNewAngle<27000; if (bSlant) @@ -2480,7 +2480,7 @@ bool SdrDragMirror::ImpCheckSide(const Point& rPnt) const { long nAngle1=GetAngle(rPnt-DragStat().GetRef1()); nAngle1-=nAngle; - nAngle1=NormAngle360(nAngle1); + nAngle1=NormAngle36000(nAngle1); return nAngle1<18000; } @@ -2514,7 +2514,7 @@ bool SdrDragMirror::BeginSdrDrag() aDif=pH2->GetPos()-pH1->GetPos(); bool b90=(aDif.X()==0) || aDif.Y()==0; bool b45=b90 || (std::abs(aDif.X()) == std::abs(aDif.Y())); - nAngle=NormAngle360(GetAngle(aDif)); + nAngle=NormAngle36000(GetAngle(aDif)); if (!getSdrDragView().IsMirrorAllowed() && !b45) return false; // free choice of axis angle not allowed @@ -3163,13 +3163,13 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) if (bLwr) nPntWink+=18000; } - nPntWink=NormAngle360(nPntWink); + nPntWink=NormAngle36000(nPntWink); } else { if (nNewRad<0) nPntWink+=18000; if (bVertical) nPntWink=18000-nPntWink; - nPntWink=NormAngle180(nPntWink); + nPntWink=NormAngle18000(nPntWink); nPntWink = std::abs(nPntWink); } @@ -3177,7 +3177,7 @@ void SdrDragCrook::MoveSdrDrag(const Point& rPnt) if (bResize) { - long nMul=static_cast<long>(nUmfang*NormAngle360(nPntWink)/36000); + long nMul=static_cast<long>(nUmfang*NormAngle36000(nPntWink)/36000); if (bAtCenter) nMul*=2; diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index cb253b121444..477f97d1130f 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -149,7 +149,7 @@ long SdrGluePoint::GetAlignAngle() const void SdrGluePoint::SetAlignAngle(long nAngle) { - nAngle=NormAngle360(nAngle); + nAngle=NormAngle36000(nAngle); if (nAngle>=33750 || nAngle<2250) nAlign=SdrAlign::HORZ_RIGHT |SdrAlign::VERT_CENTER; else if (nAngle< 6750) nAlign=SdrAlign::HORZ_RIGHT |SdrAlign::VERT_TOP ; else if (nAngle<11250) nAlign=SdrAlign::HORZ_CENTER|SdrAlign::VERT_TOP ; @@ -174,7 +174,7 @@ long SdrGluePoint::EscDirToAngle(SdrEscapeDirection nEsc) SdrEscapeDirection SdrGluePoint::EscAngleToDir(long nAngle) { - nAngle=NormAngle360(nAngle); + nAngle=NormAngle36000(nAngle); if (nAngle>=31500 || nAngle<4500) return SdrEscapeDirection::RIGHT; if (nAngle<13500) diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 714332745672..68052c193e7f 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -979,9 +979,8 @@ Pointer SdrHdl::GetPointer() const default: break; } - nHdlAngle+=nRotationAngle+2249; // a little bit more (for rounding) - while (nHdlAngle<0) nHdlAngle+=36000; - while (nHdlAngle>=36000) nHdlAngle-=36000; + // a little bit more (for rounding) + nHdlAngle = NormAngle36000(nHdlAngle + nRotationAngle + 2249); nHdlAngle/=4500; switch (static_cast<sal_uInt8>(nHdlAngle)) { case 0: ePtr=PointerStyle::ESize; break; diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 2c261b5e4162..8d839abb77d5 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2951,7 +2951,7 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, // #i78696# // fRotate is mathematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - aGeoStat.nRotationAngle = NormAngle360(FRound(-fRotate / F_PI18000)); + aGeoStat.nRotationAngle = NormAngle36000(FRound(-fRotate / F_PI18000)); aGeoStat.RecalcSinCos(); Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos); } diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index 0cdaeefe3a4e..cbe1ce864f68 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -137,8 +137,8 @@ SdrCircObj::SdrCircObj( : SdrRectObj(rSdrModel, rRect) { long nAngleDif=nNewEndWink-nNewStartWink; - nStartAngle=NormAngle360(nNewStartWink); - nEndAngle=NormAngle360(nNewEndWink); + nStartAngle=NormAngle36000(nNewStartWink); + nEndAngle=NormAngle36000(nNewEndWink); if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle meCircleKind=eNewKind; bClosedObj=eNewKind!=OBJ_CARC; @@ -536,7 +536,7 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag) aPt.setX(BigMulDiv(aPt.X(),nHgt,nWdt) ); } - long nAngle=NormAngle360(GetAngle(aPt)); + long nAngle=NormAngle36000(GetAngle(aPt)); if (rDrag.GetView() && rDrag.GetView()->IsAngleSnapEnabled()) { @@ -547,7 +547,7 @@ bool SdrCircObj::applySpecialDrag(SdrDragStat& rDrag) nAngle+=nSA/2; nAngle/=nSA; nAngle*=nSA; - nAngle=NormAngle360(nAngle); + nAngle=NormAngle36000(nAngle); } } @@ -649,14 +649,14 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat) } else { if (nWdt!=0) aP.setX(aP.X()*nHgt/nWdt ); } - nStart=NormAngle360(GetAngle(aP)); + nStart=NormAngle36000(GetAngle(aP)); if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) { long nSA=rStat.GetView()->GetSnapAngle(); if (nSA!=0) { // angle snapping nStart+=nSA/2; nStart/=nSA; nStart*=nSA; - nStart=NormAngle360(nStart); + nStart=NormAngle36000(nStart); } } aP1 = GetAnglePnt(aR,nStart); @@ -670,14 +670,14 @@ void ImpCircUser::SetCreateParams(SdrDragStat const & rStat) } else { aP.setX(BigMulDiv(aP.X(),nHgt,nWdt) ); } - nEnd=NormAngle360(GetAngle(aP)); + nEnd=NormAngle36000(GetAngle(aP)); if (rStat.GetView()!=nullptr && rStat.GetView()->IsAngleSnapEnabled()) { long nSA=rStat.GetView()->GetSnapAngle(); if (nSA!=0) { // angle snapping nEnd+=nSA/2; nEnd/=nSA; nEnd*=nSA; - nEnd=NormAngle360(nEnd); + nEnd=NormAngle36000(nEnd); } } aP2 = GetAnglePnt(aR,nEnd); @@ -862,8 +862,8 @@ void SdrCircObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract } } long nAngleDif=nE0-nS0; - nStartAngle=NormAngle360(nS0); - nEndAngle =NormAngle360(nE0); + nStartAngle=NormAngle36000(nS0); + nEndAngle =NormAngle36000(nE0); if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle } } @@ -931,8 +931,8 @@ void SdrCircObj::NbcMirror(const Point& rRef1, const Point& rRef2) nStartAngle=GetAngle(aTmpPt2); nEndAngle =GetAngle(aTmpPt1); long nAngleDif=nEndAngle-nStartAngle; - nStartAngle=NormAngle360(nStartAngle); - nEndAngle =NormAngle360(nEndAngle); + nStartAngle=NormAngle36000(nStartAngle); + nEndAngle =NormAngle36000(nEndAngle); if (nAngleDif==36000) nEndAngle+=nAngleDif; // full circle } SetXPolyDirty(); diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index e2420e7d2884..24943f06d84a 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -431,7 +431,7 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& rPol.bAutoUpsideDown=false; if (rRec.bTextAutoAngle) { - long nTmpAngle=NormAngle360(rPol.nTextAngle-rRec.nTextAutoAngleView); + long nTmpAngle=NormAngle36000(rPol.nTextAngle-rRec.nTextAutoAngleView); if (nTmpAngle>=18000) { rPol.nTextAngle+=18000; rPol.bAutoUpsideDown=true; @@ -439,10 +439,10 @@ void SdrMeasureObj::ImpCalcGeometrics(const ImpMeasureRec& rRec, ImpMeasurePoly& } if (rRec.bTextUpsideDown) rPol.nTextAngle+=18000; - rPol.nTextAngle=NormAngle360(rPol.nTextAngle); + rPol.nTextAngle=NormAngle36000(rPol.nTextAngle); rPol.nHlpAngle=rPol.nLineAngle+9000; if (rRec.bBelowRefEdge) rPol.nHlpAngle+=18000; - rPol.nHlpAngle=NormAngle360(rPol.nHlpAngle); + rPol.nHlpAngle=NormAngle36000(rPol.nHlpAngle); double nHlpSin=nLineCos; double nHlpCos=-nLineSin; if (rRec.bBelowRefEdge) { diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 5173a9ff8bf3..0b8243eba921 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -315,8 +315,8 @@ void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi long dx=rP2.X()-rP1.X(); long dy=rP2.Y()-rP1.Y(); long dAngle=GetAngle(Point(dx,dy))-nTangAngle; - dAngle=NormAngle360(dAngle); - long nTmpAngle=NormAngle360(9000-dAngle); + dAngle=NormAngle36000(dAngle); + long nTmpAngle=NormAngle36000(9000-dAngle); bool bRet=nTmpAngle!=9000 && nTmpAngle!=27000; long nRad=0; if (bRet) { @@ -325,13 +325,13 @@ void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi nRad=std::abs(FRound(nR)); } if (dAngle<18000) { - nCircStAngle=NormAngle360(nTangAngle-9000); - nCircRelAngle=NormAngle360(2*dAngle); + nCircStAngle=NormAngle36000(nTangAngle-9000); + nCircRelAngle=NormAngle36000(2*dAngle); aCircCenter.AdjustX(FRound(nRad*cos((nTangAngle+9000)*nPi180)) ); aCircCenter.AdjustY( -(FRound(nRad*sin((nTangAngle+9000)*nPi180))) ); } else { - nCircStAngle=NormAngle360(nTangAngle+9000); - nCircRelAngle=-NormAngle360(36000-2*dAngle); + nCircStAngle=NormAngle36000(nTangAngle+9000); + nCircRelAngle=-NormAngle36000(36000-2*dAngle); aCircCenter.AdjustX(FRound(nRad*cos((nTangAngle-9000)*nPi180)) ); aCircCenter.AdjustY( -(FRound(nRad*sin((nTangAngle-9000)*nPi180))) ); } @@ -344,7 +344,7 @@ void ImpPathCreateUser::CalcCircle(const Point& rP1, const Point& rP2, const Poi nCircRelAngle+=nSA/2; nCircRelAngle/=nSA; nCircRelAngle*=nSA; - nCircRelAngle=NormAngle360(nCircRelAngle); + nCircRelAngle=NormAngle36000(nCircRelAngle); if (bNeg) nCircRelAngle=-nCircRelAngle; } } @@ -363,7 +363,7 @@ XPolygon ImpPathCreateUser::GetCirclePoly() const return aXP; } else { XPolygon aXP(aCircCenter,nCircRadius,nCircRadius, - sal_uInt16(NormAngle360(nCircStAngle+nCircRelAngle+5)/10),sal_uInt16((nCircStAngle+5)/10),false); + sal_uInt16(NormAngle36000(nCircStAngle+nCircRelAngle+5)/10),sal_uInt16((nCircStAngle+5)/10),false); sal_uInt16 nCount=aXP.GetPointCount(); for (sal_uInt16 nNum=nCount/2; nNum>0;) { nNum--; // reverse XPoly's order of points @@ -2982,7 +2982,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // #i78696# // fRotate is mathematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - aGeo.nRotationAngle = NormAngle360(FRound(-fRotate / F_PI18000)); + aGeo.nRotationAngle = NormAngle36000(FRound(-fRotate / F_PI18000)); aGeo.RecalcSinCos(); } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a7e706da16a6..54fcda68de12 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1703,7 +1703,7 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // #i78696# // fRotate is matematically correct, but aGeoStat.nRotationAngle is // mirrored -> mirror value here - aGeoStat.nRotationAngle = NormAngle360(FRound(-fRotate / F_PI18000)); + aGeoStat.nRotationAngle = NormAngle36000(FRound(-fRotate / F_PI18000)); aGeoStat.RecalcSinCos(); Rotate(Point(), aGeoStat.nRotationAngle, aGeoStat.nSin, aGeoStat.nCos); } diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx index b2b3afd2fc74..91c294eea919 100644 --- a/svx/source/svdraw/svdotxtr.cxx +++ b/svx/source/svdraw/svdotxtr.cxx @@ -156,7 +156,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract if (bRota90Merk) { bool bRota90=aGeo.nRotationAngle % 9000 ==0; if (!bRota90) { // there's seems to be a rounding error occurring: correct it - long a=NormAngle360(aGeo.nRotationAngle); + long a=NormAngle36000(aGeo.nRotationAngle); if (a<4500) a=0; else if (a<13500) a=9000; else if (a<22500) a=18000; @@ -196,11 +196,11 @@ void SdrTextObj::NbcRotate(const Point& rRef, long nAngle, double sn, double cs) maRect.SetRight(maRect.Left()+dx ); maRect.SetBottom(maRect.Top()+dy ); if (aGeo.nRotationAngle==0) { - aGeo.nRotationAngle=NormAngle360(nAngle); + aGeo.nRotationAngle=NormAngle36000(nAngle); aGeo.nSin=sn; aGeo.nCos=cs; } else { - aGeo.nRotationAngle=NormAngle360(aGeo.nRotationAngle+nAngle); + aGeo.nRotationAngle=NormAngle36000(aGeo.nRotationAngle+nAngle); aGeo.RecalcSinCos(); } SetRectsDirty(); @@ -258,7 +258,7 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2) if (bRota90Merk) { bool bRota90=aGeo.nRotationAngle % 9000 ==0; if (bRota90Merk && !bRota90) { // there's seems to be a rounding error occurring: correct it - long a=NormAngle360(aGeo.nRotationAngle); + long a=NormAngle36000(aGeo.nRotationAngle); if (a<4500) a=0; else if (a<13500) a=9000; else if (a<22500) a=18000; diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx index c9e7326b26d3..34bb9396659b 100644 --- a/svx/source/svdraw/svdtrans.cxx +++ b/svx/source/svdraw/svdtrans.cxx @@ -394,14 +394,14 @@ long GetAngle(const Point& rPnt) return a; } -long NormAngle180(long a) +long NormAngle18000(long a) { while (a<-18000) a+=36000; while (a>=18000) a-=36000; return a; } -long NormAngle360(long a) +long NormAngle36000(long a) { while (a<0) a+=36000; while (a>=36000) a-=36000; @@ -483,7 +483,7 @@ tools::Polygon Rect2Poly(const tools::Rectangle& rRect, const GeoStat& rGeo) void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGeo) { rGeo.nRotationAngle=GetAngle(rPol[1]-rPol[0]); - rGeo.nRotationAngle=NormAngle360(rGeo.nRotationAngle); + rGeo.nRotationAngle=NormAngle36000(rGeo.nRotationAngle); // rotation successful rGeo.RecalcSinCos(); @@ -507,9 +507,9 @@ void Poly2Rect(const tools::Polygon& rPol, tools::Rectangle& rRect, GeoStat& rGe nShW+=18000; aPt0=rPol[3]; } - nShW=NormAngle180(nShW); + nShW=NormAngle18000(nShW); if (nShW<-9000 || nShW>9000) { - nShW=NormAngle180(nShW+18000); + nShW=NormAngle18000(nShW+18000); } if (nShW<-SDRMAXSHEAR) nShW=-SDRMAXSHEAR; // limit ShearWinkel (shear angle) to +/- 89.00 deg if (nShW>SDRMAXSHEAR) nShW=SDRMAXSHEAR; |