diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
commit | ecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch) | |
tree | 13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/examples/1overx.asy | |
parent | 790995b7e79697514364450bf9c04f1b8d500838 (diff) |
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/examples/1overx.asy')
-rw-r--r-- | graphics/asymptote/examples/1overx.asy | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/graphics/asymptote/examples/1overx.asy b/graphics/asymptote/examples/1overx.asy index 9bbbf282ac..dfaa049efb 100644 --- a/graphics/asymptote/examples/1overx.asy +++ b/graphics/asymptote/examples/1overx.asy @@ -1,16 +1,11 @@ import graph; size(200,IgnoreAspect); -real f(real x) {return 1/x;}; +real f(real x) {return 1/x;} bool3 branch(real x) { - static int lastsign=0; - if(x == 0) return false; - int sign=sgn(x); - bool b=lastsign == 0 || sign == lastsign; - lastsign=sign; - return b ? true : default; + return x != 0; } draw(graph(f,-1,1,branch)); |