aboutsummaryrefslogtreecommitdiff
path: root/src/sample/uniform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sample/uniform.rs')
-rw-r--r--src/sample/uniform.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sample/uniform.rs b/src/sample/uniform.rs
index cc6825a..e2f0b7c 100644
--- a/src/sample/uniform.rs
+++ b/src/sample/uniform.rs
@@ -15,13 +15,14 @@ impl UniformSampler {
pub fn new() -> Self {
Self {
r: Pcg32::seed_from_u64(1),
- d: Uniform::from(0.0..1.0),
+ d: Uniform::new(0.0, 1.0),
}
}
}
impl Sampler for UniformSampler {
fn get_sample(&mut self) -> Float {
- self.d.sample(&mut self.r)
+ let sample = self.d.sample(&mut self.r);
+ sample
}
}