summaryrefslogtreecommitdiff
path: root/src/math.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2019-03-14 13:18:55 -0500
committertom barrett <spalf0@gmail.com>2019-03-14 13:18:55 -0500
commit69aa9f090d551c1ebb211f3a01273b28421fc9c0 (patch)
tree6bec4cc35fcda170ebb57da6328b76a1f88d8609 /src/math.rs
parent0973ac1666a6ee3b606a537742abe506719fd156 (diff)
fleshing out tractorbeam
Diffstat (limited to 'src/math.rs')
-rw-r--r--src/math.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/math.rs b/src/math.rs
index 9a9f7b8..e266a88 100644
--- a/src/math.rs
+++ b/src/math.rs
@@ -19,12 +19,8 @@ pub struct Vector {
}
impl Vector {
- pub fn new(v: (f64, f64, f64)) -> Vector {
- Vector {
- x: v.0,
- y: v.1,
- z: v.2,
- }
+ pub fn new(x: f64, y: f64, z: f64) -> Vector {
+ Vector { x, y, z }
}
pub fn distance_from(&self, other: Vector) -> f64 {