pub fn new(freq: f32, amp: f32) -> Self {
        let freq = if freq < 0.0 {
            0.0
        } else if freq > 1252.0 {
            1252.0
        } else {
            freq
        };

        let amp = if amp < 0.0 {
            0.0
        } else if amp > 1.799 {
            1.799
        } else {
            amp
        };

        Self {
            frequency: freq,
            amplitude: amp,
        }
    }
/// Constructor of Rumble.
/// If arguments not in line with constraints, args will be saturated.
Constructor of Rumble.
If arguments not in line with constraints, args will be saturated.
Constructor of Rumble . If arguments not in line with constraints args will be saturated .
pub fn new(freq: f32, amp: f32) -> Self {
        let freq = if freq < 0.0 {
            0.0
        } else if freq > 1252.0 {
            1252.0
        } else {
            freq
        };
        let amp = if amp < 0.0 {
            0.0
        } else if amp > 1.799 {
            1.799
        } else {
            amp
        };
        Self {
            frequency: freq,
            amplitude: amp,
        }
    }
pub fn new ( freq : f32 , amp : f32 ) -> Self { let freq = if freq < 0.0 { 0.0 } else if freq > 1252.0 { 1252.0 } else { freq } ; let amp = if amp < 0.0 { 0.0 } else if amp > 1.799 { 1.799 } else { amp } ; Self { frequency : freq , amplitude : amp , } }
Constructor of Rumble.
Constructor of Rumble .
freq
f32
amp
f32
freq
f32
amp
f32