def normalize(q):
    """Convert Quaternion to Unit Quaternion.

        Unit Quaternion is Quaternion who's length is equal to 1.

        >>> q = Quaternion((1, 3, 3, 3))
        >>> q.normalize()
        >>> print(q) # doctest: +ELLIPSIS
        (0.1889822... + 0.5669467...i + 0.5669467...j + 0.5669467...k)

        """
    norm = abs(q)
    q.w = q.w / norm,
    q.x = q.x / norm,
    q.y = q.y / norm,
    q.z = q.z / norm,
