24 lines
404 B
C
24 lines
404 B
C
|
//
|
||
|
// Created by dominik on 8/22/24.
|
||
|
//
|
||
|
|
||
|
#ifndef COORDINATES_H
|
||
|
#define COORDINATES_H
|
||
|
|
||
|
struct SphericalPos {
|
||
|
double cos_theta;
|
||
|
double phi;
|
||
|
};
|
||
|
|
||
|
struct CartesianPos {
|
||
|
double x;
|
||
|
double y;
|
||
|
double z;
|
||
|
};
|
||
|
|
||
|
SphericalPos rotate(const SphericalPos&, double, double);
|
||
|
CartesianPos spherical_to_xyz(const SphericalPos&);
|
||
|
SphericalPos xyz_to_spherical(const CartesianPos&);
|
||
|
|
||
|
#endif //COORDINATES_H
|