fn calculate_center(
    rectangle_size: u32,
    content_size: u32,
    relative_position: &EdgePosition,
) -> u32 {
    ((rectangle_size - content_size) as f32 * relative_position.0 / 100.0) as u32
}
/// This helper function is used to find the top (or) left corner of a text.
/// It takes handles only one dimension per call to make it more reusable.
/// It takes a `rectangle_size` which is the length (width or height) of the surrounding rectangle
/// and a `content_size` which is the length (width or height) of the text inside.
/// The `relative_position` is then used to divide the space
/// which is not used up by the content (=`content_size`) to determine a padding
/// inside the rectangle `rectangle_size`.
This helper function is used to find the top (or) left corner of a text.
It takes handles only one dimension per call to make it more reusable.
It takes a `rectangle_size` which is the length (width or height) of the surrounding rectangle
and a `content_size` which is the length (width or height) of the text inside.
This helper function is used to find the top ( or ) left corner of a text . It takes handles only one dimension per call to make it more reusable . It takes a ` rectangle_size ` which is the length ( width or height ) of the surrounding rectangle and a ` content_size ` which is the length ( width or height ) of the text inside .
fn calculate_center(
    rectangle_size: u32,
    content_size: u32,
    relative_position: &EdgePosition,
) -> u32 {
    ((rectangle_size - content_size) as f32 * relative_position.0 / 100.0) as u32
}
fn calculate_center ( rectangle_size : u32 , content_size : u32 , relative_position : & EdgePosition , ) -> u32 { ( ( rectangle_size - content_size ) as f32 * relative_position . 0 / 100.0 ) as u32 }
This helper function is used to find the top (or) left corner of a text.
This helper function is used to find the top ( or ) left corner of a text .
rectangle_size
u32
content_size
u32
relative_position
&EdgePosition
rectangle_size
u32
content_size
u32
relative_position
&EdgePosition