mirror of
https://git.mills.io/prologic/zs
synced 2024-11-22 05:16:11 +03:00
fixed math package
This commit is contained in:
parent
2901049048
commit
2a61f06e5a
@ -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 <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))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user