diff options
author | Josep Sanjuas <jsanjuas@gmail.com> | 2015-04-18 13:38:15 +0200 |
---|---|---|
committer | Josep Sanjuas <jsanjuas@gmail.com> | 2015-04-18 13:38:15 +0200 |
commit | 44246b670921aca1d31cb74dcc00139b5ed9a2c2 (patch) | |
tree | a3cd099d83ab4c267e611f502a409ff5d2a37d98 | |
parent | e76f54e059fc89bb2cdab0a61700988c56b609d3 (diff) | |
download | Nim-44246b670921aca1d31cb74dcc00139b5ed9a2c2.tar.gz |
Document toFloat is necessary
-rw-r--r-- | lib/pure/math.nim | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim index ef9c69e3c..05c2cf57c 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -125,6 +125,7 @@ proc mean*[T](x: openArray[T]): float {.noSideEffect.} = proc variance*[T](x: openArray[T]): float {.noSideEffect.} = ## computes the variance of the elements in `x`. ## If `x` is empty, NaN is returned. + ## ``toFloat(x: T): float`` must be defined. result = 0.0 var m = mean(x) for i in items(x): |