summaryrefslogtreecommitdiff
path: root/src/math.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2018-02-27 03:36:04 -0600
committertom barrett <spalf0@gmail.com>2018-02-27 03:36:04 -0600
commit87346ea9b91d441e92c476785c2cb979f9a23bf5 (patch)
tree6cf1b044e8f7d895d61a768d9294158d6aab36d0 /src/math.rs
parentc14dcf1998f5ba1ffea813da4f793fc3bde8c2b7 (diff)
-set up display for navigation system
Diffstat (limited to 'src/math.rs')
-rw-r--r--src/math.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/math.rs b/src/math.rs
new file mode 100644
index 0000000..6766a60
--- /dev/null
+++ b/src/math.rs
@@ -0,0 +1,3 @@
+pub fn distance(l0 : (f64, f64, f64), l1 : (f64, f64, f64)) -> f64 {
+ (((l1.0-l0.0).powf(2.0) + (l1.1-l0.1).powf(2.0) + (l1.2-l0.2).powf(2.0))).sqrt()
+}