clampHeading method

Orientation clampHeading()

Implementation

Orientation clampHeading() {
  var adjustedHeading = heading;
  if (heading >= 360) adjustedHeading -= 360;
  if (heading < 0) adjustedHeading = 360 + heading;
  return Orientation(x: x, y: y, z: adjustedHeading);
}