(q)
return q
Returns a quaternion where q.w >= 0 to remove redundancy due to q = -q.

  Args:
    q: A quaternion to be standardized.

  Returns:
    A quaternion with q.w >= 0.
Returns a quaternion where q.w >= 0 to remove redundancy due to q = -q.
Returns a quaternion where q . w > = 0 to remove redundancy due to q = - q .
def standardize_quaternion(q):
  """Returns a quaternion where q.w >= 0 to remove redundancy due to q = -q.

  Args:
    q: A quaternion to be standardized.

  Returns:
    A quaternion with q.w >= 0.

  """
  if q[-1] < 0:
    q = -q
  return q
def standardize_quaternion ( q ) : if q [ - 1 ] < 0 : q = - q return q