summaryrefslogtreecommitdiff
path: root/graphics/asymptote/examples/1overx.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/examples/1overx.asy')
-rw-r--r--graphics/asymptote/examples/1overx.asy9
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));