diff options
Diffstat (limited to 'Build/source/utils/asymptote/pair.h')
-rw-r--r-- | Build/source/utils/asymptote/pair.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/utils/asymptote/pair.h b/Build/source/utils/asymptote/pair.h index c4746003265..cd719a26518 100644 --- a/Build/source/utils/asymptote/pair.h +++ b/Build/source/utils/asymptote/pair.h @@ -147,14 +147,14 @@ public: return z.length(); } - double angle() const + double angle(bool warn=true) const { - return camp::angle(x,y); + return camp::angle(x,y,warn); } - friend double angle(const pair& z) + friend double angle(const pair& z, bool warn=true) { - return z.angle(); + return z.angle(warn); } friend pair unit(const pair& z) @@ -207,7 +207,10 @@ public: if(paren) s >> c; s >> z.x >> std::ws; if(!s.eof() && s.peek() == ',') s >> c >> z.y; - else z.y=0.0; + else { + if(paren && !s.eof()) s >> z.y; + else z.y=0.0; + } if(paren) { s >> std::ws; if(s.peek() == ')') s >> c; |