summaryrefslogtreecommitdiff
path: root/Master/texmf/doc/asymptote/examples/irregularcontour.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-16 18:38:18 +0000
committerKarl Berry <karl@freefriends.org>2010-05-16 18:38:18 +0000
commit9b042a93e8f489c694af2e2e121e5aedd7671d8a (patch)
tree4b4e6b79f46eb1faf6b5ca4b5318ae907daf38bc /Master/texmf/doc/asymptote/examples/irregularcontour.asy
parent165b3785f8aa3ff267097b479870e9a39ba5c14b (diff)
asymptote 1.94
git-svn-id: svn://tug.org/texlive/trunk@18288 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/irregularcontour.asy')
-rw-r--r--Master/texmf/doc/asymptote/examples/irregularcontour.asy8
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/texmf/doc/asymptote/examples/irregularcontour.asy b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
index b72ddd0e08b..70b38ae15e7 100644
--- a/Master/texmf/doc/asymptote/examples/irregularcontour.asy
+++ b/Master/texmf/doc/asymptote/examples/irregularcontour.asy
@@ -4,13 +4,15 @@ size(200);
int n=100;
-pair[] points=new pair[n];
-real[] values=new real[n];
-
real f(real a, real b) {return a^2+b^2;}
+srand(1);
+
real r() {return 1.1*(rand()/randMax*2-1);}
+pair[] points=new pair[n];
+real[] values=new real[n];
+
for(int i=0; i < n; ++i) {
points[i]=(r(),r());
values[i]=f(points[i].x,points[i].y);