summaryrefslogtreecommitdiff
path: root/src/astroid.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/astroid.rs')
-rw-r--r--src/astroid.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/astroid.rs b/src/astroid.rs
index 077c5bf..ab00e6e 100644
--- a/src/astroid.rs
+++ b/src/astroid.rs
@@ -8,7 +8,7 @@ use astroid::rand::Rng;
#[derive(Serialize, Deserialize, Debug)]
pub struct Astroid {
name : String,
- t : Type,
+ mass_type : Type,
position : (f64, f64, f64),
velocity : (f64, f64, f64),
}
@@ -20,13 +20,13 @@ impl Astroid {
.take(8)
.collect();
let mut pr = Range::new(-50.0, 50.0);
- let mut vr = Range::new(-5.0, 5.0);
+ let mut vr = Range::new(-1.0, 1.0);
let mut rng = rand::thread_rng();
let position = (pr.sample(&mut rng), pr.sample(&mut rng), pr.sample(&mut rng));
let velocity = (vr.sample(&mut rng), vr.sample(&mut rng), vr.sample(&mut rng));
Astroid {
name : name,
- t : Type::Astroid,
+ mass_type : Type::Astroid,
position : position,
velocity : velocity,
}