From: Serge A. Zaitsev Date: Sun, 30 Aug 2015 12:45:06 +0000 (+0200) Subject: fixed math package X-Git-Tag: 0.0.1~23 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=2a61f06e5aa78fbc51387f703564fc734e2fb1ce;p=aya.git fixed math package --- diff --git a/zs_ext.go b/zs_ext.go index cedd884..b22ec88 100644 --- a/zs_ext.go +++ b/zs_ext.go @@ -7,8 +7,9 @@ import ( "strings" "time" + "math" + "github.com/drhodes/golorem" - "github.com/google/gxui/math" "github.com/jaytaylor/html2text" ) @@ -98,5 +99,5 @@ func WordCount(args []string) int { // zs timetoread -- returns number of minutes required to read the text func TimeToRead(args []string) int { wc := WordCount(args) - return int(math.Round(float64(wc) / float64(200))) + return int(math.Floor(float64(wc)/200.0 + .5)) }