aboutsummaryrefslogtreecommitdiff
path: root/go-src/ctfcMath
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2021-07-22 09:17:28 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2021-07-22 09:17:28 +0300
commit4f9a8920b080e6aee7e19e394654bf879c5759e2 (patch)
tree9792318353c048ccb9b8d304dcd35a68d2bfbbfa /go-src/ctfcMath
parent12558447c73da90f63276143f4d6a8796ec2fe7b (diff)
downloadctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.tar
ctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.tar.gz
ctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.zip
Moved chat pagination and real time updating to it's own package, implemeneted pagination navigation
Diffstat (limited to 'go-src/ctfcMath')
-rw-r--r--go-src/ctfcMath/ctfcMath.go14
1 files changed, 14 insertions, 0 deletions
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)))
+}