normalizeDegree static method
Normalizes degree to 0-360
Implementation
static double normalizeDegree(double degree) {
var degreeNormalized = 360 % degree;
if (degreeNormalized < 0) {
degreeNormalized = 360 + degreeNormalized;
}
return degreeNormalized;
}