pub struct Force2D { /* private fields */ }
Implementations§
Source§impl Force2D
impl Force2D
pub fn equals(&self, other: &Force2D) -> bool
pub fn add(&self, other: &Force2D) -> Force2D
pub fn sub(&self, other: &Force2D) -> Force2D
pub fn dot(&self, other: &Force2D) -> f64
pub fn dot_scalar(&self, scalar: f64) -> Force2D
pub fn div_scalar(&self, scalar: f64) -> Force2D
pub fn dx(&self) -> f64
pub fn set_dx(&mut self, x: f64)
pub fn dy(&self) -> f64
pub fn set_dy(&mut self, y: f64)
pub fn norm(&self) -> f64
pub fn manhattan_norm(&self) -> f64
pub fn square_norm(&self) -> f64
pub fn unit(&self) -> Force2D
Trait Implementations§
Source§impl FromWasmAbi for Force2D
impl FromWasmAbi for Force2D
Source§impl IntoWasmAbi for Force2D
impl IntoWasmAbi for Force2D
Source§impl LongRefFromWasmAbi for Force2D
impl LongRefFromWasmAbi for Force2D
Source§impl OptionFromWasmAbi for Force2D
impl OptionFromWasmAbi for Force2D
Source§impl OptionIntoWasmAbi for Force2D
impl OptionIntoWasmAbi for Force2D
Source§impl RefFromWasmAbi for Force2D
impl RefFromWasmAbi for Force2D
Source§impl RefMutFromWasmAbi for Force2D
impl RefMutFromWasmAbi for Force2D
Source§impl TryFromJsValue for Force2D
impl TryFromJsValue for Force2D
Source§impl VectorFromWasmAbi for Force2D
impl VectorFromWasmAbi for Force2D
Source§impl VectorIntoWasmAbi for Force2D
impl VectorIntoWasmAbi for Force2D
impl Copy for Force2D
impl SupportsConstructor for Force2D
impl SupportsInstanceProperty for Force2D
impl SupportsStaticProperty for Force2D
Auto Trait Implementations§
impl Freeze for Force2D
impl RefUnwindSafe for Force2D
impl Send for Force2D
impl Sync for Force2D
impl Unpin for Force2D
impl UnwindSafe for Force2D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.