From 44246b670921aca1d31cb74dcc00139b5ed9a2c2 Mon Sep 17 00:00:00 2001 From: Josep Sanjuas Date: Sat, 18 Apr 2015 13:38:15 +0200 Subject: [PATCH] Document toFloat is necessary --- lib/pure/math.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pure/math.nim b/lib/pure/math.nim index ef9c69e3cf..05c2cf57cb 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):