-
Notifications
You must be signed in to change notification settings - Fork 199
/
computers.go
57 lines (50 loc) · 947 Bytes
/
computers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package core
// MaxInt32 returns the maximum of two given numbers
func MaxInt32(a int32, b int32) int32 {
if a > b {
return a
}
return b
}
// MinInt returns the minimum of two given numbers
func MinInt(a int, b int) int {
if a < b {
return a
}
return b
}
// MinInt32 returns the minimum of two given numbers
func MinInt32(a int32, b int32) int32 {
if a < b {
return a
}
return b
}
// MaxUint32 returns the maximum of two given numbers
func MaxUint32(a uint32, b uint32) uint32 {
if a > b {
return a
}
return b
}
// MinUint32 returns the minimum of two given numbers
func MinUint32(a uint32, b uint32) uint32 {
if a < b {
return a
}
return b
}
// MaxUint64 returns the maximum of two given numbers
func MaxUint64(a uint64, b uint64) uint64 {
if a > b {
return a
}
return b
}
// MinUint64 returns the minimum of two given numbers
func MinUint64(a uint64, b uint64) uint64 {
if a < b {
return a
}
return b
}