summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/three_arrows.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-08 18:41:28 +0000
committerKarl Berry <karl@freefriends.org>2013-04-08 18:41:28 +0000
commita3358f7394e3adabeff44a4858bab8f13cbe1180 (patch)
tree014354d566c06a47c483b7231af921247180f770 /Master/texmf-dist/asymptote/three_arrows.asy
parent11bcd1a52098dab6ac5baa790409a2261a31755f (diff)
asymptote 2.21
git-svn-id: svn://tug.org/texlive/trunk@29753 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/three_arrows.asy')
-rw-r--r--Master/texmf-dist/asymptote/three_arrows.asy7
1 files changed, 4 insertions, 3 deletions
diff --git a/Master/texmf-dist/asymptote/three_arrows.asy b/Master/texmf-dist/asymptote/three_arrows.asy
index 8346a5bc6c1..5b9bd45d56f 100644
--- a/Master/texmf-dist/asymptote/three_arrows.asy
+++ b/Master/texmf-dist/asymptote/three_arrows.asy
@@ -118,7 +118,8 @@ struct arrowhead3
static path[] align(path H, path h) {
static real fuzz=1000*realEpsilon;
real[][] t=intersections(H,h,fuzz*max(abs(max(h)),abs(min(h))));
- return rotate(-degrees(point(H,t[0][0])-point(H,t[1][0]),warn=false))*H;
+ return t.length >= 2 ?
+ rotate(-degrees(point(H,t[0][0])-point(H,t[1][0]),warn=false))*H : H;
}
}
@@ -248,8 +249,8 @@ real[] arrowbasepoints(path3 base, path3 left, path3 right)
{
real[][] Tl=transpose(intersections(left,base));
real[][] Tr=transpose(intersections(right,base));
- return new real[] {Tl.length > 0 ? Tl[0][0] : 1,
- Tr.length > 0 ? Tr[0][0] : 1};
+ return new real[] {Tl.length > 0 ? Tl[0][0] : 0,
+ Tr.length > 0 ? Tr[0][0] : 0};
}
path3 arrowbase(path3 r, triple y, real t, real size)