Search Apps Documentation Source Content File Folder Download Copy Actions Download

mathutils.gno

0.25 Kb · 26 lines
 1package mathutils
 2
 3func Max(a, b int) int {
 4	if a > b {
 5		return a
 6	}
 7	return b
 8}
 9
10func Min(a, b int) int {
11	if a < b {
12		return a
13	}
14	return b
15}
16
17func Abs(a int) int {
18	if a < 0 {
19		return -a
20	}
21	return a
22}
23
24func IsEven(n int) bool {
25	return n%2 == 0
26}