Kaydet (Commit) ab0195a5 authored tarafından Fridrich Štrba's avatar Fridrich Štrba

CDR: fix large-angle computation

Change-Id: Ia3f937b0b49093fbdbbe259b835a2d8a81633fe1
üst 701cc2aa
--- a/src/lib/CDRParser.cpp
+++ b/src/lib/CDRParser.cpp
@@ -1186,6 +1186,16 @@ void libcdr::CDRParser::readEllipse(WPXInputStream *input)
double rx = fabs(cx);
double ry = fabs(cy);
+ while (angle1 < 0.0)
+ angle1 += 2*M_PI;
+ while (angle1 > 2*M_PI)
+ angle1 -= 2*M_PI;
+
+ while (angle2 < 0.0)
+ angle2 += 2*M_PI;
+ while (angle2 > 2*M_PI)
+ angle2 -= 2*M_PI;
+
if (angle1 != angle2)
{
if (angle2 < angle1)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment