From 2a61f06e5aa78fbc51387f703564fc734e2fb1ce Mon Sep 17 00:00:00 2001 From: "Serge A. Zaitsev" Date: Sun, 30 Aug 2015 14:45:06 +0200 Subject: [PATCH] fixed math package --- zs_ext.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)) }