Browse Source

Revert debugging change

master
Stephen 2 weeks ago
parent
commit
d87f77cdb0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/pdf.rs

+ 2
- 2
src/pdf.rs View File

@ -67,12 +67,12 @@ impl<'a> MixturePdf<'a> {
impl<'a> Pdf for MixturePdf<'a> {
fn value(&self, direction: Vec3) -> f64 {
0.5 * self.p1.value(direction) + 0.5 * self.p1.value(direction)
0.5 * self.p0.value(direction) + 0.5 * self.p1.value(direction)
}
fn generate(&self, rng: &mut ThreadRng) -> Vec3 {
if rng.gen() {
self.p1.generate(rng)
self.p0.generate(rng)
} else {
self.p1.generate(rng)
}


Loading…
Cancel
Save