anchor.diff:  
   %% @doc Converts from body rates (degrees) to a quaternion.
   from_body_rates(degrees, {X, Y, Z}) ->
  -	from_body_rates(radians, {deg2rad(X), deg2rad(Y), deg2rad(Z)}). 
  +	from_body_rates(radians, {deg2rad(X), deg2rad(Y), deg2rad(Z)}).
   
   % -------------------------------------------------------------------------
   
  
positive.code: 	HalfRoll = Roll / 2,
  
  	{
  		math:cos(HalfPitch) * math:cos(HalfRoll) * math:cos(HalfYaw) +
  				math:sin(HalfPitch) * math:sin(HalfRoll) * math:sin(HalfYaw), 
  
  		math:sin(HalfPitch) * math:cos(HalfRoll) * math:cos(HalfYaw) -
  				math:cos(HalfPitch) * math:sin(HalfRoll) * math:sin(HalfYaw), 
  		
  		math:cos(HalfPitch) * math:sin(HalfRoll) * math:cos(HalfYaw) +
  				math:sin(HalfPitch) * math:cos(HalfRoll) * math:sin(HalfYaw), 
  		
  		math:cos(HalfPitch) * math:cos(HalfRoll) * math:sin(HalfYaw) +
  				math:sin(HalfPitch) * math:sin(HalfRoll) * math:cos(HalfYaw) 
  	};
  
  %% @doc Converts from a vector of euler angles (degrees) to a quaternion.
  
negative.code: 
  % -------------------------------------------------------------------------
  
  % external api
  -export([quat_to_list/1, list_to_quat/1, add/2, subtract/2, multiply/2, divide/2, reorient/2]).
  -export([scale_rotation/2, norm/1, length/1, unit/1, conjugate/1, inverse/1, reciprocal/1]).
  -export([compose/2, relative_to/2, rotate/2, from_axis_angle/2, from_axis_angle/3]).
  -export([from_body_rates/1, from_body_rates/2, from_euler/1, from_euler/2, rad2deg/1, deg2rad/1, is_zero/1]).
  -export([init/0]).
  
  -export_type([quat/0]).
  
  