Initial import

This commit is contained in:
George Suntres
2026-03-29 10:32:25 -04:00
commit ebdf370c23
11 changed files with 515 additions and 0 deletions

11
math.go Normal file
View File

@@ -0,0 +1,11 @@
package commons
// MathMin will compare two integers and return the one with the smaller value.
func MathMin[T ~int | ~int8 | ~int16 | ~int32 | ~int64 |
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
~float32 | ~float64 | ~string](a, b T) T {
if a < b {
return a
}
return b
}