summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/examples/1overx.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/examples/1overx.asy')
-rw-r--r--Build/source/utils/asymptote/examples/1overx.asy9
1 files changed, 2 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/examples/1overx.asy b/Build/source/utils/asymptote/examples/1overx.asy
index 9bbbf282aca..dfaa049efb5 100644
--- a/Build/source/utils/asymptote/examples/1overx.asy
+++ b/Build/source/utils/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));