Summary Files Commits Branches @commit @diff @stats
path: root / go-src / ctfcMath
diff options
context:
space:
mode:
Commit4f9a8920b080e6aee7e19e394654bf879c5759e2 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-07-22 09:17:28 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2021-07-22 09:17:28 +0300
Files9792318353c048ccb9b8d304dcd35a68d2bfbbfa /go-src/ctfcMath
ctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.tar
ctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.tar.gz
ctfc-4f9a8920b080e6aee7e19e394654bf879c5759e2.zip
Parent12558447c73da90f63276143f4d6a8796ec2fe7b (diff)
Moved chat pagination and real time updating to it's own package, implemeneted pagination navigation
1 files changed, 14 insertions, 0 deletions
-rw-r--r--go-src/ctfcMath/ctfcMath.go14
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)))
+}