Function rcppsw::math::normalized_diff(const degrees&, const degrees&)

Function Documentation

degrees rcppsw::math::normalized_diff(const degrees &angle1, const degrees &angle2)

Calculates the normalized difference between the given angles.

The difference is calculated as (angle1 - angle2) and then normalized in [-180,180].

Returns:

The difference between the two angles.