Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 15 lines (15 sloc) 0.421 kb
ab7df07a »
2009-12-08 update pi() and e() to use syntax closer to standard M. Add tests
1 function val = pi(rows, cols)
2 %% val = pi()
84916b5a »
2009-10-13 initial dump of Matrixy repo from code.google.com/p/matrixy
3 %% returns the value of pi to about 13 decimal places
ab7df07a »
2009-12-08 update pi() and e() to use syntax closer to standard M. Add tests
4 % TODO: Should take an arbitrary number of args and return an N-dim matrix
5 _p = 3.1415926535898;
6 if nargin == 0
7 val = _p;
8 else
9 if nargin == 1
10 cols = rows;
11 end
12 val = parrot_new("NumMatrix2D");
13 parrot_method(val, "fill", _p, rows, cols);
14 end
84916b5a »
2009-10-13 initial dump of Matrixy repo from code.google.com/p/matrixy
15 endfunction
Something went wrong with that request. Please try again.