From 63bd19127f66dda81007fcd0d8857e978740101f Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Mon, 30 Sep 2024 12:01:07 -0400 Subject: First commit --- src/units.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/units.rs (limited to 'src/units.rs') diff --git a/src/units.rs b/src/units.rs new file mode 100644 index 0000000..cc04098 --- /dev/null +++ b/src/units.rs @@ -0,0 +1,13 @@ +use std::f64::consts::PI; + +pub const GRAVITATIONAL_CONSTANT : f64 = 6.67430e-11; +pub const AU : f64 = 1.495979e11; + +pub type Second = u64; +pub type Meter = f64; +pub type Rad = f64; +pub type Kilogram = f64; + +pub fn to_rad(deg : f64) -> Rad +{ (deg / 180.0) * PI } + -- cgit v1.2.1