use super::base::Radians;
use super::polar::Polar;
#[derive(Debug, PartialEq, Copy, Clone, Default)]
pub struct Spherical {
pub theta: Radians,
pub phi: Radians,
}
impl Spherical {
pub const fn new(theta: Radians, phi: Radians) -> Self {
Self { theta, phi }
}
pub const fn theta(&self) -> Radians {
self.theta
}
pub const fn phi(&self) -> Radians {
self.phi
}
pub fn unproject_gnomonic(self) -> Polar {
let theta = self.theta;
let phi = self.phi;
Polar::new(phi.get().tan(), theta)
}
}