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.
This commit is contained in:
hmmmmmmmm 2019-02-01 14:09:51 +00:00 committed by GitHub
parent 8e972f7541
commit df176218f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ func RoundFloat64(x float64) float64 {
return math.Floor(x + 0.5) return math.Floor(x + 0.5)
} }
func FloorFloat64(x float64) float64 {
return math.Floor(x)
}
func AbsInt(x int) int { func AbsInt(x int) int {
if x >= 0 { if x >= 0 {
return x return x