IAP GITLAB

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

simplified QuantitVector::GetX/Y/Z

parent e5c811b3
No related branches found
No related tags found
1 merge request!155simplified QuantityVector::GetX/Y/Z
......@@ -54,11 +54,11 @@ namespace corsika::geometry {
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 {
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