Struct statics::Vector
[−]
[src]
pub struct Vector { /* fields omitted */ }
Type that implements a vector for force calculations.
Internally, it's represented as a magnitude and angle. You can consider it as a right triangle similar to the below:
ⓘThis example is not tested
/| / | / | /___|
The Vector also provides the ability to get the component forces (vertical and horizontal) which is useful for calculating composite forces.
Methods
impl Vector
[src]
pub fn unit() -> Self
[src]
A vector of magnitude 1, with angle 0deg
pub fn from_mag_and_angle(mag: Mass, angle: Angle) -> Self
[src]
Factor based on a magnitude and angle
pub fn mag(&self) -> Mass
[src]
pub fn angle(&self) -> &Angle
[src]
pub fn vertical(&self) -> Vector
[src]
The vertical component of the Vector
pub fn horizontal(&self) -> Vector
[src]
The horizontal component of the Vector