protected static float smoothUpdate(final float goal, final float actual) {
        final double diff = AngleUtils.difference(actual, goal);

        double offset = 0;

        // If the difference is smaller than 1 degree, do nothing as it
        // causes the arrow to vibrate. Round away from 0.
        if (diff > 1.0) {
            offset = Math.ceil(diff / 10.0); // for larger angles, rotate faster
        } else if (diff < 1.0) {
            offset = Math.floor(diff / 10.0);
        }

        return AngleUtils.normalize((float) (actual + offset));
    }
Compute the new value, moving by small increments.

@param goal   the goal to reach
@param actual the actual value
@return the new value
main/src/main/java/cgeo/geocaching/ui/CompassView.java