Figuring out the smallest angle difference (useful in games, etc).