pub struct Solid {
pub length: f32,
pub width: f32,
pub height: f32,
}Fields§
§length: f32length of Solid
width: f32width of Solid
height: f32height of Solid
Implementations§
Trait Implementations§
Source§impl Formula for Solid
impl Formula for Solid
Source§fn get_volume(&self) -> f32
fn get_volume(&self) -> f32
this function return volume
§Examples
Basic usage:
use formula_3d_shape_lib::solid::Solid;
use formula_3d_shape_lib::common_formula::Formula;
let solid1 = Solid::new(4.0, 10.0,3.0);
solid1.get_volume();Source§fn get_surface_area(&self) -> f32
fn get_surface_area(&self) -> f32
This function return surface area
§Examples
Basic usage:
use formula_3d_shape_lib::solid::Solid;
use formula_3d_shape_lib::common_formula::Formula;
let solid1 = Solid::new(4.0, 10.0,3.0);
solid1.get_surface_area();Auto Trait Implementations§
impl Freeze for Solid
impl RefUnwindSafe for Solid
impl Send for Solid
impl Sync for Solid
impl Unpin for Solid
impl UnwindSafe for Solid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more