aboutsummaryrefslogtreecommitdiff
path: root/utils.go
blob: a0d0e7c36269caffb9569825ffd193b51e002a10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

package main

import "math"

// FMin return mins of floats
func FMin(a float64, b float64) float64 {
	if a >= b {
		return a
	}
	return b
}

func DegreesToRadians(degrees float64) float64 {
	return degrees * 2.0 * math.Pi / 360.0
}