IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 4faf376a authored by Maximilian Reininghaus's avatar Maximilian Reininghaus :vulcan:
Browse files

Merge branch 'qvector' into 'master'

simplified QuantityVector::GetX/Y/Z

See merge request !155
parents e5c811b3 07174050
No related branches found
No related tags found
1 merge request!155simplified QuantityVector::GetX/Y/Z
Pipeline #993 passed
...@@ -54,11 +54,11 @@ namespace corsika::geometry { ...@@ -54,11 +54,11 @@ 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 GetX() const { return (*this)[0]; }
auto GetY() const { return Quantity(phys::units::detail::magnitude_tag, eVector[1]); } auto GetY() const { return (*this)[1]; }
auto GetZ() const { return Quantity(phys::units::detail::magnitude_tag, eVector[2]); } auto GetZ() const { return (*this)[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