reduction of calls to atan2, sin and cos

This commit is contained in:
2025-06-04 10:43:39 +02:00
parent 2439f4fca9
commit 532bdf7979
17 changed files with 94 additions and 33 deletions
+13
View File
@@ -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);