diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-27 23:41:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-27 23:41:11 +0000 |
commit | 8027f287eb46d487a0e379911bdbc4d6c2bf44e4 (patch) | |
tree | b6e3aeebab3f5c2560ae1ab892b76cca269eb05e /Master/texmf-dist/asymptote/math.asy | |
parent | a4855ce49e2101557c17547c2d22594e1b2a215c (diff) |
asymptote 2.78 support files
git-svn-id: svn://tug.org/texlive/trunk@62265 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/math.asy')
-rw-r--r-- | Master/texmf-dist/asymptote/math.asy | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Master/texmf-dist/asymptote/math.asy b/Master/texmf-dist/asymptote/math.asy index 3dde1b9dd4c..d0ce5233400 100644 --- a/Master/texmf-dist/asymptote/math.asy +++ b/Master/texmf-dist/asymptote/math.asy @@ -325,45 +325,45 @@ real interpolate(real[] x, real[] y, real x0) private string nopoint="point not found"; // Return the nth intersection time of path g with the vertical line through x. -real time(path g, real x, int n=0) +real time(path g, real x, int n=0, real fuzz=-1) { - real[] t=times(g,x); + real[] t=times(g,x,fuzz); if(t.length <= n) abort(nopoint); return t[n]; } // Return the nth intersection time of path g with the horizontal line through // (0,z.y). -real time(path g, explicit pair z, int n=0) +real time(path g, explicit pair z, int n=0, real fuzz=-1) { - real[] t=times(g,z); + real[] t=times(g,z,fuzz); if(t.length <= n) abort(nopoint); return t[n]; } // Return the nth y value of g at x. -real value(path g, real x, int n=0) +real value(path g, real x, int n=0, real fuzz=-1) { - return point(g,time(g,x,n)).y; + return point(g,time(g,x,n,fuzz)).y; } // Return the nth x value of g at y=z.y. -real value(path g, explicit pair z, int n=0) +real value(path g, explicit pair z, int n=0, real fuzz=-1) { - return point(g,time(g,(0,z.y),n)).x; + return point(g,time(g,(0,z.y),n,fuzz)).x; } // Return the nth slope of g at x. -real slope(path g, real x, int n=0) +real slope(path g, real x, int n=0, real fuzz=-1) { - pair a=dir(g,time(g,x,n)); + pair a=dir(g,time(g,x,n,fuzz)); return a.y/a.x; } // Return the nth slope of g at y=z.y. -real slope(path g, explicit pair z, int n=0) +real slope(path g, explicit pair z, int n=0, real fuzz=-1) { - pair a=dir(g,time(g,(0,z.y),n)); + pair a=dir(g,time(g,(0,z.y),n,fuzz)); return a.y/a.x; } |