pub fn perform(&self, size: (f64, f64)) -> (f64, f64) {
        let size = {
            let width = if self.width > 0.0 { self.width } else { size.0 };
            let height = if self.height > 0.0 {
                self.height
            } else {
                size.1
            };

            (width, height)
        };

        (
            // check `width` value to meet the constraint requirement
            constrain(size.0, self.min_width, self.max_width, self.width),
            // check `height` value to meet the constraint requirement
            constrain(size.1, self.min_height, self.max_height, self.height),
        )
    }
/// Adjust the given `size`.
///
/// Asures that size will respect the defined `box` values for min
/// and max constraints. The value will be adapted if outside of a bound.
Adjust the given `size`.
Asures that size will respect the defined `box` values for min
and max constraints. The value will be adapted if outside of a bound.
Adjust the given ` size ` . Asures that size will respect the defined ` box ` values for min and max constraints . The value will be adapted if outside of a bound .
pub fn perform(&self, size: (f64, f64)) -> (f64, f64) {
        let size = {
            let width = if self.width > 0.0 { self.width } else { size.0 };
            let height = if self.height > 0.0 {
                self.height
            } else {
                size.1
            };
            (width, height)
        };
        (
            // check `width` value to meet the constraint requirement
            constrain(size.0, self.min_width, self.max_width, self.width),
            // check `height` value to meet the constraint requirement
            constrain(size.1, self.min_height, self.max_height, self.height),
        )
    }
pub fn perform ( & self , size : ( f64 , f64 ) ) -> ( f64 , f64 ) { let size = { let width = if self . width > 0.0 { self . width } else { size . 0 } ; let height = if self . height > 0.0 { self . height } else { size . 1 } ; ( width , height ) } ; ( // check `width` value to meet the constraint requirement constrain ( size . 0 , self . min_width , self . max_width , self . width ) , // check `height` value to meet the constraint requirement constrain ( size . 1 , self . min_height , self . max_height , self . height ) , ) }
Adjust the given `size`.
Adjust the given ` size ` .
&self
size
(f64, f64)