Skip to content

Commit

Permalink
Correction in operator<< overload of Cartesian Coordinate(#113)
Browse files Browse the repository at this point in the history
replaced get_x() with get_z() for cartesian coordinate
  • Loading branch information
nitink25 authored Mar 10, 2020
1 parent 8b2a2ac commit feec6d4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions include/boost/astronomy/coordinate/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ template
class YQuantity,
class ZQuantity
>
std::ostream& operator<< (std::ostream &out, cartesian_representation< CoordinateType, XQuantity, YQuantity, ZQuantity> const& point)
std::ostream& operator<< (std::ostream &out, cartesian_representation
<CoordinateType, XQuantity, YQuantity, ZQuantity> const& point)
{
out << "Cartesian Representation ( " << point.get_x() << " , " << point.get_y() << " , " << point.get_x() << " )";
out << "Cartesian Representation ( "
<< point.get_x() << " , "
<< point.get_y() << " , "
<< point.get_z() << " )";

return out;
}
Expand All @@ -37,9 +41,13 @@ template
class LonQuantity,
class DistQuantity
>
std::ostream& operator<< (std::ostream &out, spherical_equatorial_representation< CoordinateType, LatQuantity, LonQuantity, DistQuantity> const& point)
std::ostream& operator<< (std::ostream &out, spherical_equatorial_representation
<CoordinateType, LatQuantity, LonQuantity, DistQuantity> const& point)
{
out << "Spherical Equatorial Representation ( " << point.get_lat() << " , " << point.get_lon() << " , " << point.get_dist() << " )";
out << "Spherical Equatorial Representation ( "
<< point.get_lat() << " , "
<< point.get_lon() << " , "
<< point.get_dist() << " )";

return out;
}
Expand All @@ -52,9 +60,13 @@ template
class LonQuantity,
class DistQuantity
>
std::ostream& operator<< (std::ostream &out, spherical_representation< CoordinateType, LatQuantity, LonQuantity, DistQuantity> const& point)
std::ostream& operator<< (std::ostream &out, spherical_representation
<CoordinateType, LatQuantity, LonQuantity, DistQuantity> const& point)
{
out << "Spherical Representation ( " << point.get_lat() << " , " << point.get_lon() << " , " << point.get_dist() << " )";
out << "Spherical Representation ( "
<< point.get_lat() << " , "
<< point.get_lon() << " , "
<< point.get_dist() << " )";

return out;
}
Expand Down

0 comments on commit feec6d4

Please sign in to comment.