using System;
using System.Collections.Generic;
public static class MathUtil
{
public static double AnglesDiff(double firstAngle, double secondAngle)
{
var difference = secondAngle - firstAngle;
while (difference < -180) difference += 360;
while (difference > 180) difference -= 360;
return difference;
}
}