Struct PointForce2D
pub struct PointForce2D {
pub position_x: f64,
pub position_y: f64,
pub force_x: f64,
pub force_y: f64,
}Expand description
A planar force applied at a position relative to a chosen moment point.
Fields§
§position_x: f64Horizontal position from the chosen origin.
position_y: f64Vertical position from the chosen origin.
force_x: f64Horizontal force component.
force_y: f64Vertical force component.
Implementations§
§impl PointForce2D
impl PointForce2D
pub fn new(
position_x: f64,
position_y: f64,
force_x: f64,
force_y: f64,
) -> Option<PointForce2D>
pub fn new( position_x: f64, position_y: f64, force_x: f64, force_y: f64, ) -> Option<PointForce2D>
Creates a new point force when all values are finite.
pub fn moment_about_origin(&self) -> Option<f64>
pub fn moment_about_origin(&self) -> Option<f64>
Returns the moment of this force about the origin.
Trait Implementations§
§impl Clone for PointForce2D
impl Clone for PointForce2D
§fn clone(&self) -> PointForce2D
fn clone(&self) -> PointForce2D
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for PointForce2D
impl Debug for PointForce2D
§impl PartialEq for PointForce2D
impl PartialEq for PointForce2D
impl Copy for PointForce2D
impl StructuralPartialEq for PointForce2D
Auto Trait Implementations§
impl Freeze for PointForce2D
impl RefUnwindSafe for PointForce2D
impl Send for PointForce2D
impl Sync for PointForce2D
impl Unpin for PointForce2D
impl UnsafeUnpin for PointForce2D
impl UnwindSafe for PointForce2D
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