From 4f9a8920b080e6aee7e19e394654bf879c5759e2 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 22 Jul 2021 09:17:28 +0300 Subject: Moved chat pagination and real time updating to it's own package, implemeneted pagination navigation --- go-src/ctfcMath/ctfcMath.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 go-src/ctfcMath/ctfcMath.go (limited to 'go-src/ctfcMath') diff --git a/go-src/ctfcMath/ctfcMath.go b/go-src/ctfcMath/ctfcMath.go new file mode 100644 index 0000000..5dfc613 --- /dev/null +++ b/go-src/ctfcMath/ctfcMath.go @@ -0,0 +1,14 @@ +package ctfcmath + +import "math" + +func MaxInt(x int, y int) int { + if x > y { + return x + } + return y +} + +func CeilDivInt(x int, y int) int { + return int(math.Ceil(float64(x) / float64(y))) +} -- cgit v1.2.3