deltaAngle static method

double deltaAngle(
  1. double angle1,
  2. double angle2
)

Implementation

static double deltaAngle(double angle1, double angle2) {
  var deltaAngle = angle1 - angle2;
  if (deltaAngle > 180) {
    deltaAngle -= 360;
  } else if (deltaAngle < -180) {
    deltaAngle += 360;
  }
  return deltaAngle;
}