Trait sphrs::SHCoordinates

source ·
pub trait SHCoordinates<T>: Sized {
    // Required methods
    fn theta(&self) -> T;
    fn phi(&self) -> T;
    fn r(&self) -> T;
    fn x(&self) -> T;
    fn y(&self) -> T;
    fn z(&self) -> T;
    fn theta_cos(&self) -> T;
}
Expand description

Definition of coordinates

Coordinates used in sphrs must implement this trait.

Required Methods§

source

fn theta(&self) -> T

Return theta (spherical coordinates)

source

fn phi(&self) -> T

Return phi (spherical coordinates)

source

fn r(&self) -> T

Return radus r (spherical coordinates)

source

fn x(&self) -> T

Return x (Cartesian coordinates)

source

fn y(&self) -> T

Return y (Cartesian coordinates)

source

fn z(&self) -> T

Return z (Cartesian coordinates)

source

fn theta_cos(&self) -> T

Return cos(theta)

Implementors§

source§

impl<T> SHCoordinates<T> for Coordinates<T>where T: SphrsFloat,