Fixed math error, div 0.

Fixed crash due to Quat class not accounting for the singularity, and
therefore dividing by zero.