code: def _fast_normalise(self):
          
          if not self.is_unit():
              mag_squared = np.dot(self.q, self.q)
              if (mag_squared == 0):
                  return
              if (abs(1.0 - mag_squared) < 2.107342e-08):
                  mag =  ((1.0 + mag_squared) / 2.0) # More efficient. Pade approximation valid if error is small
              else:
                  mag =  sqrt(mag_squared) # Error is too big, take the performance hit to calculate the square root properly
  
              self.q = self.q / mag
docs: Normalise the object to a unit quaternion using a fast approximation method if appropriate.
  
          Object is guaranteed to be a quaternion of approximately unit length
          after calling this operation UNLESS the object is equivalent to Quaternion(0)