anchor.diff:      (+ (*s start-quat start-mult)
          (*s end-quat end-mult))))
   
  -(defun approx-slerp (start-quat end-quat pos)
  -  (let* ((cos-angle (v4:dot start-quat end-quat))
  +(defn approx-slerp ((start-quat quaternion) (end-quat quaternion)
  +					(pos single-float)) quaternion
  +  (declare (optimize (speed 3) (safety 1) (debug 1)))
  +  (let* ((cos-angle (dot start-quat end-quat))
            (factor (expt (cl:- 1.0 (cl:* 0.7878088 cos-angle)) 2.0))
            (k (cl:* 0.5069269 factor))
            (b (cl:* 2.0 k))
  
positive.code:                       recip))
            quat))))
  
  (defun from-axis-angle (axis-vec3 angle)
    (let ((length (v3:length-squared axis-vec3)))
      (if (cl:= 0f0 length)
          (identity)
  
negative.code:               (cl:- (cl:* norm-recip (y quat)))
                (cl:- (cl:* norm-recip (z quat))))))))
  
  (defn %+ ((quat-a quaternion) (quat-b quaternion)) quaternion
    "Add two quats and return a new quat containing the result"
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (q! (cl:+ (w quat-a) (w quat-b))
  	  (cl:+ (x quat-a) (x quat-b))
  	  (cl:+ (y quat-a) (y quat-b))
  	  (cl:+ (z quat-a) (z quat-b))))
  
  (defn + (&rest (quats quaternion)) quaternion
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (if quats
        (let ((w 0f0)
  			(x 0f0)
              (y 0f0)
              (z 0f0))
          (declare (single-float x y z w))
          (loop :for vec :in quats :do
  		   (incf w (w vec))
             (incf x (x vec))
             (incf y (y vec))
             (incf z (z vec)))
          (q! w x y z))
        (identity)))
  
  (define-compiler-macro + (&rest components)
    (reduce (lambda (a x) `(%+ ,a ,x)) components))
  
  (defn %- ((quat-a quaternion) (quat-b quaternion)) quaternion
    "Add two quats and return a new quat containing the result"
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (q! (cl:- (w quat-a) (w quat-b))
  	  (cl:- (x quat-a) (x quat-b))
  	  (cl:- (y quat-a) (y quat-b))
  	  (cl:- (z quat-a) (z quat-b))))
  
  (defn - ((quat quaternion) &rest (quats quaternion)) quaternion
    "takes any number of vectors and add them all together
     returning a new vector"
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (assert quat)
    (if quats
        (let ((x (x quat))
              (y (y quat))
              (z (z quat))
              (w (w quat)))
          (declare (single-float x y z w))
          (loop :for vec :in quats :do
             (cl:decf x (x vec))
             (cl:decf y (y vec))
             (cl:decf z (z vec))
             (cl:decf w (w vec)))
          (q! x y z w))
        quat))
  
  (define-compiler-macro - (&rest components)
    (reduce (lambda (a x) `(%- ,a ,x)) components))
  
  (defn *s ((quat-a quaternion) (scalar single-float)) quaternion
    "Multiply quat by scalar"
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (q! (cl:* (w quat-a) scalar)
  	  (cl:* (x quat-a) scalar)
  	  (cl:* (y quat-a) scalar)
  	  (cl:* (z quat-a) scalar)))
  
  (defn * ((quat-a quaternion) (quat-b quaternion)) quaternion
    (declare (optimize (speed 3) (safety 1) (debug 1)))
    (q! (cl:- (cl:* (w quat-a) (w quat-b))
              (cl:* (x quat-a) (x quat-b))
              (cl:* (y quat-a) (y quat-b))
  