tech: upgraded macaron & macaron inject, binding, session

This commit is contained in:
Torkel Ödegaard
2017-04-25 15:16:32 +02:00
parent 9f462c0519
commit 4720216e5e
39 changed files with 740 additions and 1319 deletions
+10 -5
View File
@@ -14,11 +14,16 @@
package com
// PowInt is int type of math.Pow function.
// PowInt is int type of math.Pow function.
func PowInt(x int, y int) int {
num := 1
for i := 0; i < y; i++ {
num *= x
if y <= 0 {
return 1
} else {
if y % 2 == 0 {
sqrt := PowInt(x, y/2)
return sqrt * sqrt
} else {
return PowInt(x, y-1) * x
}
}
return num
}