Merge pull request #760 from TriedAngle/master

Update: rand in solar_system example
This commit is contained in:
Héctor Ramón 2021-03-05 03:10:55 +01:00 committed by GitHub
commit a74974a8e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View File

@ -7,4 +7,4 @@ publish = false
[dependencies]
iced = { path = "../..", features = ["canvas", "tokio", "debug"] }
rand = "0.7"
rand = "0.8.3"

View File

@ -117,15 +117,13 @@ impl State {
(
Point::new(
rng.gen_range(
-(width as f32) / 2.0,
width as f32 / 2.0,
(-(width as f32) / 2.0)..(width as f32 / 2.0),
),
rng.gen_range(
-(height as f32) / 2.0,
height as f32 / 2.0,
(-(height as f32) / 2.0)..(height as f32 / 2.0),
),
),
rng.gen_range(0.5, 1.0),
rng.gen_range(0.5..1.0),
)
})
.collect()