class Gambit::ColliderBit::P2

A simple container for a point on an xy plane. More…

#include <PointsAndLines.hpp>

Public Functions

Name
P2()
Default constructor.
P2(double x, double y)
Coordinate constructor.
P2(const P2 & other)
Copy constructor.
P2 &operator=(const P2 & other)
Copy assignment operator.
P2 &setx(double x)
P2 &sety(double y)
P2 &setxy(double x, double y)
doublegetx() const
doublegety() const
doubleabs() const
Get the length of the vector from the origin to this point.
doubler() const
Alias for abs.
P2 &operator+=(const P2 & other)
P2 &operator-=(const P2 & other)
P2 &operator*=(double a)
P2 &operator/=(double a)

Detailed Description

class Gambit::ColliderBit::P2;

A simple container for a point on an xy plane.

This class is largely based upon the structure of the P4 class which is part of HEPUtils –https://bitbucket.org/andybuckley/heputils Copyright (C) 2013-2015 Andy Buckley andy.buckley@cern.ch

Modified to a simple point on a 2d-plane by Abram Krislock a.m.b.krislock@fys.uio.no

Public Functions Documentation

function P2

inline P2()

Default constructor.

function P2

inline P2(
    double x,
    double y
)

Coordinate constructor.

function P2

inline P2(
    const P2 & other
)

Copy constructor.

function operator=

inline P2 & operator=(
    const P2 & other
)

Copy assignment operator.

function setx

inline P2 & setx(
    double x
)

function sety

inline P2 & sety(
    double y
)

function setxy

inline P2 & setxy(
    double x,
    double y
)

function getx

inline double getx() const

function gety

inline double gety() const

function abs

inline double abs() const

Get the length of the vector from the origin to this point.

function r

inline double r() const

Alias for abs.

function operator+=

inline P2 & operator+=(
    const P2 & other
)

function operator-=

inline P2 & operator-=(
    const P2 & other
)

function operator*=

inline P2 & operator*=(
    double a
)

function operator/=

inline P2 & operator/=(
    double a
)

Updated on 2023-06-26 at 21:36:52 +0000