IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 883b0e15 authored by ralfulrich's avatar ralfulrich
Browse files

some getters -> style

parent 24b4271f
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,9 @@ namespace corsika::geometry { ...@@ -37,6 +37,9 @@ namespace corsika::geometry {
// TODO: this should be private or protected, we don NOT want to expose numbers // TODO: this should be private or protected, we don NOT want to expose numbers
// without reference to outside: // without reference to outside:
auto GetCoordinates() const { return BaseVector<length_d>::qVector; } auto GetCoordinates() const { return BaseVector<length_d>::qVector; }
auto GetX() const { return BaseVector<length_d>::qVector.GetX(); }
auto GetY() const { return BaseVector<length_d>::qVector.GetY(); }
auto GetZ() const { return BaseVector<length_d>::qVector.GetZ(); }
/// this always returns a QuantityVector as triple /// this always returns a QuantityVector as triple
auto GetCoordinates(CoordinateSystem const& pCS) const { auto GetCoordinates(CoordinateSystem const& pCS) const {
......
...@@ -55,6 +55,12 @@ namespace corsika::geometry { ...@@ -55,6 +55,12 @@ namespace corsika::geometry {
return Quantity(phys::units::detail::magnitude_tag, eVector[index]); return Quantity(phys::units::detail::magnitude_tag, eVector[index]);
} }
auto GetX() const { return Quantity(phys::units::detail::magnitude_tag, eVector[0]); }
auto GetY() const { return Quantity(phys::units::detail::magnitude_tag, eVector[1]); }
auto GetZ() const { return Quantity(phys::units::detail::magnitude_tag, eVector[2]); }
auto norm() const { auto norm() const {
return Quantity(phys::units::detail::magnitude_tag, eVector.norm()); return Quantity(phys::units::detail::magnitude_tag, eVector.norm());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment