reduction of calls to atan2, sin and cos
This commit is contained in:
@@ -41,6 +41,13 @@ class Coordinate {
|
||||
// return the value of the stored coordinate transformed to Cylinder space
|
||||
virtual blitz::TinyVector<double, 3> cylinderEntries() const = 0;
|
||||
|
||||
// return cos(phi) with phi the second variable of the coordinate in cylinder
|
||||
// coordinates
|
||||
virtual double cosAzimuth() const = 0;
|
||||
// return cos(phi) with phi the second variable of the coordinate in cylinder
|
||||
// coordinates
|
||||
virtual double sinAzimuth() const = 0;
|
||||
|
||||
// add the values of the parameter coordinate to the value stored in this variable
|
||||
virtual void add(const Coordinate& coordinate) = 0;
|
||||
};
|
||||
@@ -58,6 +65,9 @@ class CartesianCoordinate : public Coordinate {
|
||||
// return the value of the stored coordinate transformed to Cylider space
|
||||
blitz::TinyVector<double, 3> cylinderEntries() const;
|
||||
|
||||
double cosAzimuth() const;
|
||||
double sinAzimuth() const;
|
||||
|
||||
// add the values of the parameter coordinate to the value stored in this variable
|
||||
void add(const Coordinate& coordinate);
|
||||
|
||||
@@ -77,6 +87,9 @@ class CylinderCoordinate : public Coordinate {
|
||||
// return the value of the stored coordinate transformed to Cylinder space
|
||||
blitz::TinyVector<double, 3> cylinderEntries() const;
|
||||
|
||||
double cosAzimuth() const;
|
||||
double sinAzimuth() const;
|
||||
|
||||
// add the values of the parameter coordinate to the value stored in this variable
|
||||
void add(const Coordinate& coordinate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user