Use PI's value from the C lib.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit 8bc51aef53)
r14.0.x
gregory guy 5 years ago committed by Slávek Banko
parent 6b59b0be7f
commit 78178b45c7
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -543,9 +543,9 @@ void GraphWidget::drawEdge(const TQString& sCaller, const TQString& sCallee,
// Draw the edge
pEdge->show();
}
#define PI 3.14159265
#ifndef M_PI
#define M_PI 3.14159265
#endif
/**
* Sets and computes values used for drawing arrows.
* Initialises the static ArroInfo structure, which is passed in drawEdge().
@ -558,7 +558,7 @@ void GraphWidget::setArrowInfo(int nLength, int nDegrees)
double dRad;
// Turn degrees into radians
dRad = ((double)nDegrees) * PI / 180.0;
dRad = ((double)nDegrees) * M_PI / 180.0;
s_ai.m_dLength = (double)nLength;
s_ai.m_dTan = tan(dRad);

Loading…
Cancel
Save