From df176218f1536b8db5a895f43f66d45c539442a6 Mon Sep 17 00:00:00 2001 From: hmmmmmmmm Date: Fri, 1 Feb 2019 14:09:51 +0000 Subject: [PATCH] Added a floor function for scrolling. A floor function was needed to calculate the number of rows to scroll by when scrolling by half a page. --- utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.go b/utils.go index 25af8be..f780451 100644 --- a/utils.go +++ b/utils.go @@ -112,6 +112,10 @@ func RoundFloat64(x float64) float64 { return math.Floor(x + 0.5) } +func FloorFloat64(x float64) float64 { + return math.Floor(x) +} + func AbsInt(x int) int { if x >= 0 { return x