diff options
author | def <dennis@felsin9.de> | 2015-01-12 23:44:14 +0100 |
---|---|---|
committer | def <dennis@felsin9.de> | 2015-02-16 20:44:24 +0100 |
commit | 8c92a788530f2234d24c321670f9654b5fc4eceb (patch) | |
tree | d39d8600feeff53e3fbb318b3d1910ceb0ad9c68 | |
parent | aa4d119e8cd13f89a9c007b141b035a207e1af64 (diff) | |
download | Nim-8c92a788530f2234d24c321670f9654b5fc4eceb.tar.gz |
Export new math procs
-rw-r--r-- | lib/pure/math.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim index b2a588aa8..e520720d3 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -280,11 +280,11 @@ proc random*[T](x: Slice[T]): T = ## For a slice `a .. b` returns a value in the range `a .. b-1`. result = random(x.b - x.a) + x.a -proc random[T](a: openArray[T]): T = +proc random*[T](a: openArray[T]): T = ## returns a random element from the openarray `a`. result = a[random(a.low..a.len)] -proc shuffle[T](a: var openArray[T]) = +proc shuffle*[T](a: var openArray[T]) = ## Shuffles the elements in `a`. Note that ``randomize`` needs to be called ## to initialize the random number generator, otherwise ``shuffle`` always ## shuffles in the same way. |