package calc

import "math"

func AngleDiff(firstAngle, secondAngle float64) float64 { // in rads
	difference := secondAngle - firstAngle
	for difference < -math.Pi {
		difference += math.Pi * 2
	}
	for difference > math.Pi {
		difference -= math.Pi * 2
	}
	return difference
}
