summaryrefslogtreecommitdiffstats
path: root/src/units.rs
diff options
context:
space:
mode:
authorJon Santmyer <jon@jonsantmyer.com>2024-09-30 12:01:07 -0400
committerJon Santmyer <jon@jonsantmyer.com>2024-09-30 12:01:07 -0400
commit63bd19127f66dda81007fcd0d8857e978740101f (patch)
tree781e971abde6f79b35b457927129066df42d955e /src/units.rs
downloadsystemic-63bd19127f66dda81007fcd0d8857e978740101f.tar.gz
systemic-63bd19127f66dda81007fcd0d8857e978740101f.tar.bz2
systemic-63bd19127f66dda81007fcd0d8857e978740101f.zip
First commitHEADmaster
Diffstat (limited to 'src/units.rs')
-rw-r--r--src/units.rs13
1 files changed, 13 insertions, 0 deletions
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 }
+