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

Function Documentation

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

Calculates the normalized difference between the given angles.

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

Returns:

The difference between the two angles.