41 return vec3 (st*cos(phi), st*sin(phi), cos(theta));
45 theta = atan2(sqrt(inp.
x*inp.
x+inp.
y*inp.
y),inp.
z);
47 if (phi<0.) phi += twopi;
64 ostream &operator<< (ostream &os,
const pointing &p)
66 os << p.
theta <<
", " << p.
phi << std::endl;
double safe_atan2(double y, double x)
double fmodulo(double v1, double v2)
void from_vec3(const vec3 &inp)