use crate::coord::Coord;
use crate::time;
pub trait CelObj {
fn locationcart(&self, d: time::Date) -> (f64, f64, f64);
fn location(&self, d: time::Date) -> Coord {
let (x, y, z) = self.locationcart(d);
Coord::from_cartesian(x, y, z)
}
fn distance(&self, d: time::Date) -> f64 {
let (x, y, z) = self.locationcart(d);
(x * x + y * y + z * z).sqrt()
}
}