Skip to content
Snippets Groups Projects
Open VectorXYZT::mag() may be confusing since not four-vector magnitude
  • View options
  • VectorXYZT::mag() may be confusing since not four-vector magnitude

  • View options
  • Open Issue created by Wouter Deconinck

    mag() is defined as

    double mag() const {return std::hypot(x, y, z);}

    but the magnitude of a fourvector is traditionally defined as mass() (maybe up to a sign)

    double mass() const {return sqrt(t*t - x*x - y*y - z*z);}

    This might lead to confusion when people start to use this in things like q2 = (ef-ei).mag().

    • Merge request
    • Branch

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading