quaternion IF