!changed mathutil package to mathy, removed int/string casting from mathy

This commit is contained in:
alexchao26
2020-12-27 17:21:33 -05:00
parent 57fff6d829
commit 666518f507
114 changed files with 780 additions and 287 deletions
+13
View File
@@ -0,0 +1,13 @@
package algos
import (
"math/rand"
"time"
)
var rn = rand.New(rand.NewSource(time.Now().UnixNano()))
// RandomInt returns a random int from zero through upper - 1
func RandomInt(upper int) int {
return rn.Intn(upper)
}