summaryrefslogtreecommitdiff
path: root/src/astroid.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2018-02-23 07:40:05 -0600
committertom barrett <spalf0@gmail.com>2018-02-23 07:40:05 -0600
commit6634f73a6768f61f928d51941be5e970e6011f07 (patch)
tree1af5ef4a713061ad9bb10b0cb897362d59c430ec /src/astroid.rs
parent53281aa16e262124631af4abd19e16a921de098d (diff)
-changed to floats and got vec type
Diffstat (limited to 'src/astroid.rs')
-rw-r--r--src/astroid.rs8
1 files changed, 4 insertions, 4 deletions
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;
}