24 x_ = std::sin(theta) * std::cos(phi);
25 y_ = std::sin(theta) * std::sin(phi);
40 double arg =
Dot(q) / std::sqrt(ptot2);
41 if (arg > 1.0) arg = 1.0;
42 if (arg < -1.0) arg = -1.0;
52 return std::sqrt(
Mag2());
60 return std::sqrt(
Perp2());
75 if (mag2 == 0.0)
return 0.0;
85 return tot > 0.0 ? p *= (1.0 / std::sqrt(tot)) : p;
93 if (mag == 0.0)
return mag;;
105 double s = std::sin(angle);
106 double c = std::cos(angle);
108 y_ = c * yy - s *
z_;
109 z_ = s * yy + c *
z_;
116 double s = std::sin(angle);
117 double c = std::cos(angle);
119 z_ = c * zz - s *
x_;
120 x_ = s * zz + c *
x_;
127 double s = std::sin(angle);
128 double c = std::cos(angle);
130 x_ = c * xx - s *
y_;
131 y_ = s * xx + c *
y_;
double ATan2(double, double)
double Dot(const UVector3 &) const
double Angle(const UVector3 &) const