Mercurial > yakumo_izuru > aya
changeset 26:d966bcb229c0 draft
fixed math package
author | zaitsev.serge |
---|---|
date | Sun, 30 Aug 2015 12:45:06 +0000 |
parents | 42b0a9fa5883 |
children | 1254e8cb6e75 |
files | zs_ext.go |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/zs_ext.go Sun Aug 30 12:42:22 2015 +0000 +++ b/zs_ext.go Sun Aug 30 12:45:06 2015 +0000 @@ -7,8 +7,9 @@ "strings" "time" + "math" + "github.com/drhodes/golorem" - "github.com/google/gxui/math" "github.com/jaytaylor/html2text" ) @@ -98,5 +99,5 @@ // zs timetoread <file> -- 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)) }