This function could be a static, non-const member function of the surrounding class because it doesn't use any member variables. Please change the return type: it doesn't actually return a point, but instead a triple of values that represent a point in spherical coordinates. I think the best return type would be 
  std_cxx1x::array<double,3>