extended quaternion and mat3