aboutsummaryrefslogtreecommitdiff
path: root/utils.go
blob: a6c5619d141b2cac5413011c9c773df696f1792a (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
}