Comments
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
#ifndef COORDINATES_H
|
||||
#define COORDINATES_H
|
||||
|
||||
/// Coordinate types and rotations for molecular orientations on the unit sphere.
|
||||
namespace coordinates {
|
||||
|
||||
/// Spherical position stored as (cos_theta, phi) to avoid repeated cos/acos.
|
||||
struct SphericalPos {
|
||||
double cos_theta;
|
||||
double phi;
|
||||
@@ -14,7 +17,10 @@ struct CartesianPos {
|
||||
double z;
|
||||
};
|
||||
|
||||
SphericalPos rotate(const SphericalPos &, double, double);
|
||||
/// Rotate a spherical position by polar angle alpha around an axis defined
|
||||
/// by azimuthal angle beta (rotation about the original position's z-axis).
|
||||
SphericalPos rotate(const SphericalPos &, double alpha, double beta);
|
||||
|
||||
CartesianPos spherical_to_xyz(const SphericalPos &);
|
||||
SphericalPos xyz_to_spherical(const CartesianPos &);
|
||||
} // namespace coordinates
|
||||
|
||||
Reference in New Issue
Block a user