summaryrefslogtreecommitdiff
path: root/Master/texmf/asymptote/plain_arcs.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf/asymptote/plain_arcs.asy')
-rw-r--r--Master/texmf/asymptote/plain_arcs.asy5
1 files changed, 3 insertions, 2 deletions
diff --git a/Master/texmf/asymptote/plain_arcs.asy b/Master/texmf/asymptote/plain_arcs.asy
index 01e750f42cd..140bc3cff19 100644
--- a/Master/texmf/asymptote/plain_arcs.asy
+++ b/Master/texmf/asymptote/plain_arcs.asy
@@ -23,8 +23,9 @@ path arc(pair c, explicit pair z1, explicit pair z2, bool direction=CCW)
real t1=intersect(unitcircle,(0,0)--2*z1)[0];
real t2=intersect(unitcircle,(0,0)--2*z2)[0];
static int n=length(unitcircle);
- if(t1 >= t2 && direction) t1 -= n;
- if(t2 >= t1 && !direction) t2 -= n;
+ if(direction) {
+ if (t1 >= t2) t1 -= n;
+ } else if(t2 >= t1) t2 -= n;
return shift(c)*scale(r)*subpath(unitcircle,t1,t2);
}