/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/vm/s2c.rs
Line
Count
Source
1
/// Convert spherical coordinates to Cartesian.
2
#[inline]
3
0
pub fn s2c(theta: f64, phi: f64) -> [f64; 3] {
4
let cp = phi.cos();
5
[theta.cos() * cp, theta.sin() * cp, phi.sin()]
6
}