diff options
author | tom barrett <spalf0@gmail.com> | 2019-03-14 13:18:55 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-03-14 13:18:55 -0500 |
commit | 69aa9f090d551c1ebb211f3a01273b28421fc9c0 (patch) | |
tree | 6bec4cc35fcda170ebb57da6328b76a1f88d8609 /src/math.rs | |
parent | 0973ac1666a6ee3b606a537742abe506719fd156 (diff) |
fleshing out tractorbeam
Diffstat (limited to 'src/math.rs')
-rw-r--r-- | src/math.rs | 8 |
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 { |