376 T
tol =
static_cast<T
>(1
e-15);
386 squ = copy.qw * copy.qw;
387 sqx = copy.qx * copy.qx;
388 sqy = copy.qy * copy.qy;
389 sqz = copy.qz * copy.qz;
392 T
sarg = -2 * (copy.qx*copy.qz - copy.qw * copy.qy);
397 else if (
sarg >= T(1.0))
414 vec.X(T(atan2(2 * (copy.qx*copy.qy - copy.qz*copy.qw),
418 else if (std::abs(
sarg + 1) <
tol)
421 vec.X(T(atan2(-2 * (copy.qx*copy.qy - copy.qz*copy.qw),
427 vec.X(T(atan2(2 * (copy.qy*copy.qz + copy.qw*copy.qx),
431 vec.Z(T(atan2(2 * (copy.qx*copy.qy + copy.qw*copy.qz),