fix rng in svg dice example (#970)

fixed the rng range so that a 6 can be rolled
This commit is contained in:
Icekey 2023-04-22 18:09:41 +02:00 committed by GitHub
parent 73a2beb327
commit b4af761038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ fn app(cx: Scope) -> Element {
onclick: move |_| {
use rand::Rng;
let mut rng = rand::thread_rng();
val.set(rng.gen_range(1..6));
val.set(rng.gen_range(1..=6));
}
}
}