pub fn new(attenuation: Vec3, fuzzy: f32) -> Metal {
        if fuzzy > 1. {
            Metal {
                attenuation,
                fuzzy: 1.,
            }
        } else {
            Metal { attenuation, fuzzy }
        }
    }
/// Create a new metal by specifying its attenuation and fuzzyness.AsMut
///
/// The attenuation specifies how each color component in the scattered ray
/// is attenuated while the `fuzzy` parameter indicates the randomness in
/// the direction of the reflection. `fuzzy` is forced to be between 0 and 1.
///
/// A fuzzyness of 0 indicates perfect reflection.
///
/// ```
/// # use raytracer::materials::Metal;
/// # use raytracer::vec3::Vec3;
/// // Define how each color component is attenuated by the reflective material.
/// let attenuation = Vec3(0.8, 0.7, 0.9);
/// let metal = Metal::new(attenuation, 0.0);
/// ```
Create a new metal by specifying its attenuation and fuzzyness.AsMut
The attenuation specifies how each color component in the scattered ray
is attenuated while the `fuzzy` parameter indicates the randomness in
the direction of the reflection. `fuzzy` is forced to be between 0 and 1.

A fuzzyness of 0 indicates perfect reflection.


Create a new metal by specifying its attenuation and fuzzyness . AsMut The attenuation specifies how each color component in the scattered ray is attenuated while the ` fuzzy ` parameter indicates the randomness in the direction of the reflection . ` fuzzy ` is forced to be between 0 and 1 . A fuzzyness of 0 indicates perfect reflection .
pub fn new(attenuation: Vec3, fuzzy: f32) -> Metal {
        if fuzzy > 1. {
            Metal {
                attenuation,
                fuzzy: 1.,
            }
        } else {
            Metal { attenuation, fuzzy }
        }
    }
pub fn new ( attenuation : Vec3 , fuzzy : f32 ) -> Metal { if fuzzy > 1. { Metal { attenuation , fuzzy : 1. , } } else { Metal { attenuation , fuzzy } } }
Create a new metal by specifying its attenuation and fuzzyness.AsMut
The attenuation specifies how each color component in the scattered ray
is attenuated while the `fuzzy` parameter indicates the randomness in
the direction of the reflection.
Create a new metal by specifying its attenuation and fuzzyness . AsMut The attenuation specifies how each color component in the scattered ray is attenuated while the ` fuzzy ` parameter indicates the randomness in the direction of the reflection .
attenuation
Vec3
fuzzy
f32
use raytracer::materials::metal;
None
use raytracer::vec3::vec3;
Define how each color component is attenuated by the reflective material.
Define how each color component is attenuated by the reflective material .