diff options
author | Karl Berry <karl@freefriends.org> | 2020-03-03 22:35:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-03-03 22:35:09 +0000 |
commit | f6bb2b5974c9dc15a4530842100d30fe1981b973 (patch) | |
tree | 62ef95efa54d91b6eafb6df99f330dc136f77f29 /Build/source/utils/asymptote/pair.h | |
parent | 24dbc0b1802756862bedad6a4088f50aad68b51b (diff) |
asy 2.63 sources
git-svn-id: svn://tug.org/texlive/trunk@54034 c570f23f-e606-0410-a88d-b1316a301751
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; |