I have a class
class Cartesian
{
float x,y,z;
};
and another class
class Spherical
{
float rho, phi, r;
};
How would I convert between them?
I have tried adding Spherical Cartesian::toSpherical
and Cartesian Spherical::toCartesian
inside of the class declarations but no matter the order I put them in, the first one complains that the other one is undefined. I have tagged VS and Ubuntu because I want it to work for both.