anchor.diff:  	Z :: float()
   }.
   
  -% -------------------------------------------------------------------------
  -
  --on_load(init/0).
  +% ---------------------------------------------------------------------------------------------------------------------
  +
  +-define(NORMALIZED_TOLERANCE, 0.0000001).
  +-define(IDENTITY, {1, 0, 0, 0}).
  +
  +% ---------------------------------------------------------------------------------------------------------------------
  +
  +-include("log.hrl").
  +
  +%% --------------------------------------------------------------------------------------------------------------------
  +%% NIF module
  +%% --------------------------------------------------------------------------------------------------------------------
  +
  +% Don't enable this unless testing, or until _all_ functions are implemented in C++ too.
  +% (loading the NIF module actually replaces this module, so we lose the Erlang implementations if we load the C++ ones)
  +%-on_load(init/0).
   init() ->
       case erlang:load_nif("./quaternion", 0) of
   		{error, {load_failed, _}} ->
  
positive.code: divide({W, X, Y, Z}, Factor) when is_number(Factor) ->
  	{W / Factor, X / Factor, Y / Factor, Z / Factor}.
  
  % -------------------------------------------------------------------------
  
  %% @doc Reorient q1's axis of rotation by rotating it by q2, but leave q1's angle of rotation intact.
  reorient({W, X, Y, Z}, {_, _, _, _}=Q2) ->
  
negative.code: %% --------------------------------------------------------------------------------------------------------------------
  %% @doc Quaternion module - simplifies working with and perfoming math on quaternions.
  %%
  %% @copyright 2012 Christopher S. Case
  %% Licensed under the MIT license; see the LICENSE file for details.
  %% --------------------------------------------------------------------------------------------------------------------
  
  -module(quaternion).
  
  % ---------------------------------------------------------------------------------------------------------------------
  
  % external api
  -export([quat_to_list/1, list_to_quat/1, add/2, subtract/2, multiply/2, divide/2, reorient/2]).
  