From eee0da42c3defe63daa8165fb57dedd251838aed Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Sun, 3 Oct 2021 11:00:14 -0400 Subject: [PATCH] Add missing constructor for random_distributions::UniformSquare --- src/random_distributions/uniform_square.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/random_distributions/uniform_square.rs b/src/random_distributions/uniform_square.rs index e915c5c..203eed6 100644 --- a/src/random_distributions/uniform_square.rs +++ b/src/random_distributions/uniform_square.rs @@ -11,6 +11,12 @@ pub struct UniformSquare { size: f64, } +impl UniformSquare { + pub fn new(corner: Vec2, size: f64) -> UniformSquare { + UniformSquare { corner, size } + } +} + impl RandomDistribution for UniformSquare { fn value(&self) -> Vec2 { let mut rng = thread_rng();