diff --git a/crates/bevy_math/src/sampling/shape_sampling.rs b/crates/bevy_math/src/sampling/shape_sampling.rs index 348333ef70..4b245eb8ff 100644 --- a/crates/bevy_math/src/sampling/shape_sampling.rs +++ b/crates/bevy_math/src/sampling/shape_sampling.rs @@ -228,8 +228,8 @@ impl ShapeSample for Rhombus { type Output = Vec2; fn sample_interior(&self, rng: &mut R) -> Vec2 { - let x: f32 = rng.gen_range(0.0..1.0); - let y: f32 = rng.gen_range(0.0..1.0); + let x: f32 = rng.gen_range(0.0..=1.0); + let y: f32 = rng.gen_range(0.0..=1.0); let unit_p = Vec2::NEG_X + x * Vec2::ONE + Vec2::new(y, -y); unit_p * self.half_diagonals