From 6634f73a6768f61f928d51941be5e970e6011f07 Mon Sep 17 00:00:00 2001 From: tom barrett Date: Fri, 23 Feb 2018 07:40:05 -0600 Subject: -changed to floats and got vec type --- src/astroid.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/astroid.rs') diff --git a/src/astroid.rs b/src/astroid.rs index 37460cf..0eed4ff 100644 --- a/src/astroid.rs +++ b/src/astroid.rs @@ -4,11 +4,11 @@ extern crate serde_json; #[derive(Serialize, Deserialize, Debug)] pub struct Astroid { name : String, - location : (isize, isize, isize), + location : (f64, f64, f64), } impl Mass for Astroid { - fn new(name : &str, location : (isize, isize, isize)) -> Astroid { + fn new(name : &str, location : (f64, f64, f64)) -> Astroid { Astroid { name : String::from(name), location : location, @@ -19,11 +19,11 @@ impl Mass for Astroid { &self.name } - fn location(&self) -> (isize, isize, isize) { + fn location(&self) -> (f64, f64, f64) { self.location } - fn set_location(&mut self, location : (isize, isize, isize)) { + fn set_location(&mut self, location : (f64, f64, f64)) { self.location = location; } -- cgit v1.2.3