1package math
2
3import "math"
4
5// Round returns round of float64
6func Round(f float64, n int) float64 {
7	pow10N := math.Pow10(n)
8	return math.Trunc((f+0.5/pow10N)*pow10N) / pow10N
9}
10
11const MaxUint = ^uint(0)
12const MinUint = 0
13const MaxInt = int(MaxUint >> 1)
14const MinInt = -MaxInt - 1
15
16func MinInts(a int, vals ...int) int {
17	min := a
18	for _, v := range vals {
19		if v < min {
20			min = v
21		}
22	}
23	return min
24}
25
26func MaxInts(a int, vals ...int) int {
27	max := a
28	for _, v := range vals {
29		if v > max {
30			max = v
31		}
32	}
33	return max
34}
35