fn render_point(&self, x: f32, y: f32, mut rng: &mut dyn RngCore) -> [u8; 3] {
        let intensity = (0..self.samples).fold(Color::black(), |sum, _i| {
            let ray = self.camera.view(x, y, &mut rng);
            sum + self.bounce(&ray, self.bounces, None, &mut rng)
        }) / self.samples as f32;

        [
            (255.0 * intensity.r) as u8,
            (255.0 * intensity.g) as u8,
            (255.0 * intensity.b) as u8,
        ]
    }
/// Render a point on the screen
///
/// # Arguments
///
/// * `x` - the fractional position along the width of the screen
/// * `y` - the fractional position along the height of the screen
/// * `rng` - the random number generator to use
Render a point on the screen
Render a point on the screen
fn render_point(&self, x: f32, y: f32, mut rng: &mut dyn RngCore) -> [u8; 3] {
        let intensity = (0..self.samples).fold(Color::black(), |sum, _i| {
            let ray = self.camera.view(x, y, &mut rng);
            sum + self.bounce(&ray, self.bounces, None, &mut rng)
        }) / self.samples as f32;
        [
            (255.0 * intensity.r) as u8,
            (255.0 * intensity.g) as u8,
            (255.0 * intensity.b) as u8,
        ]
    }
fn render_point ( & self , x : f32 , y : f32 , mut rng : & mut dyn RngCore ) -> [ u8 ; 3 ] { let intensity = ( 0 .. self . samples ) . fold ( Color :: black ( ) , | sum , _i | { let ray = self . camera . view ( x , y , & mut rng ) ; sum + self . bounce ( & ray , self . bounces , None , & mut rng ) } ) / self . samples as f32 ; [ ( 255.0 * intensity . r ) as u8 , ( 255.0 * intensity . g ) as u8 , ( 255.0 * intensity . b ) as u8 , ] }
Render a point on the screen
Render a point on the screen
&self
x
f32
y
f32
rng
&mut dyn RngCore
&self
x
f32
y
f32
rng
&mut dyn RngCore