aboutsummaryrefslogtreecommitdiff
path: root/go-src/ctfcMath
diff options
context:
space:
mode:
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)))
+}