pub struct AngularMomentum(/* private fields */);Expand description
Angular momentum [kg·m²/s].
Implementations§
Source§impl AngularMomentum
impl AngularMomentum
Sourcepub fn from_ex(ex: impl IntoEx) -> Self
pub fn from_ex(ex: impl IntoEx) -> Self
Create from a symbolic expression (or anything that implements IntoEx).
Sourcepub fn checked_from_ex(ex: impl IntoEx, dims: &DimMap) -> Result<Self, String>
pub fn checked_from_ex(ex: impl IntoEx, dims: &DimMap) -> Result<Self, String>
Create from a symbolic expression with runtime dimension validation.
Checks that the expression’s inferred dimension matches this type’s
dimension using the provided DimMap. Returns an error if the
dimensions don’t match.
Use this instead of from_ex when you want runtime validation
of dimensional correctness (e.g., in tests or debug builds).
Sourcepub fn symbol(ctx: &Context, name: &str) -> Self
pub fn symbol(ctx: &Context, name: &str) -> Self
Create a named symbolic variable with this dimension.
Sourcepub fn into_inner(self) -> Ex
pub fn into_inner(self) -> Ex
Escape hatch: drop dimension, return raw Ex.
Sourcepub fn as_qty(self) -> Qty<AngularMomentumDim>
pub fn as_qty(self) -> Qty<AngularMomentumDim>
Convert to generic Qty<D>.
Sourcepub fn dim_name_str() -> &'static str
pub fn dim_name_str() -> &'static str
Runtime dimension name.
Sourcepub fn dim_symbol_str() -> &'static str
pub fn dim_symbol_str() -> &'static str
Runtime dimension symbol.
Sourcepub fn simplify_full(&self) -> Self
pub fn simplify_full(&self) -> Self
Full multi-pass simplification, preserving dimension.
Sourcepub fn simplify_trig(&self) -> Self
pub fn simplify_trig(&self) -> Self
Trigonometric simplification, preserving dimension.
Sourcepub fn simplify_powers(&self) -> Self
pub fn simplify_powers(&self) -> Self
Power/exponent simplification, preserving dimension.
Sourcepub fn simplify_rational(&self) -> Self
pub fn simplify_rational(&self) -> Self
Rational simplification, preserving dimension.
Sourcepub fn expand_trig(&self) -> Self
pub fn expand_trig(&self) -> Self
Expand trigonometric identities, preserving dimension.
Sourcepub fn expand_log(&self) -> Self
pub fn expand_log(&self) -> Self
Expand logarithmic identities, preserving dimension.
Sourcepub fn log_combine(&self) -> Self
pub fn log_combine(&self) -> Self
Combine logarithmic terms, preserving dimension.
Sourcepub fn trig_combine(&self) -> Self
pub fn trig_combine(&self) -> Self
Combine trigonometric terms, preserving dimension.
Sourcepub fn factor(&self, var: &impl AsRef<Ex>) -> Self
pub fn factor(&self, var: &impl AsRef<Ex>) -> Self
Factor with respect to a variable, preserving dimension.
Sourcepub fn collect(&self, var: &impl AsRef<Ex>) -> Self
pub fn collect(&self, var: &impl AsRef<Ex>) -> Self
Collect terms with respect to a variable, preserving dimension.
Sourcepub fn together(&self) -> Self
pub fn together(&self) -> Self
Combine fractions over a common denominator, preserving dimension.
Sourcepub fn partial_fractions(&self, var: &impl AsRef<Ex>) -> Self
pub fn partial_fractions(&self, var: &impl AsRef<Ex>) -> Self
Partial-fraction decomposition with respect to a variable, preserving dimension.
Sourcepub fn rationalize_denom(&self) -> Self
pub fn rationalize_denom(&self) -> Self
Rationalize the denominator, preserving dimension.
Sourcepub fn diff(&self, var: &impl AsRef<Ex>) -> Ex
pub fn diff(&self, var: &impl AsRef<Ex>) -> Ex
Differentiate with respect to a variable. Returns raw Ex.
Wrap result in the correct output type: Acceleration::from_ex(v.diff(&t))
Sourcepub fn integrate(&self, var: &impl AsRef<Ex>) -> Ex
pub fn integrate(&self, var: &impl AsRef<Ex>) -> Ex
Integrate with respect to a variable. Returns raw Ex.
Sourcepub fn free_symbols(&self) -> Vec<Ex> ⓘ
pub fn free_symbols(&self) -> Vec<Ex> ⓘ
Free symbols in the expression.
Sourcepub fn contains(&self, other: &impl AsRef<Ex>) -> bool
pub fn contains(&self, other: &impl AsRef<Ex>) -> bool
Whether the expression contains a given sub-expression.
Sourcepub fn term_count(&self) -> usize
pub fn term_count(&self) -> usize
Number of top-level additive terms.
Sourcepub fn equals(&self, other: &Self) -> bool
pub fn equals(&self, other: &Self) -> bool
Check symbolic equality with another quantity of the same type.
Sourcepub fn eval_f64(&self) -> Result<f64, SymplexError>
pub fn eval_f64(&self) -> Result<f64, SymplexError>
Evaluate to f64.
Sourcepub fn eval_f64_with(&self, subs: &[(&Ex, i64)]) -> Result<f64, SymplexError>
pub fn eval_f64_with(&self, subs: &[(&Ex, i64)]) -> Result<f64, SymplexError>
Substitute integer values and evaluate to f64.
Sourcepub fn eval_decimal(&self, digits: u32) -> Result<String, SymplexError>
pub fn eval_decimal(&self, digits: u32) -> Result<String, SymplexError>
Evaluate to a decimal string with the given number of digits.
Trait Implementations§
Source§impl Add for AngularMomentum
impl Add for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
+ operator.Source§fn add(self, rhs: AngularMomentum) -> AngularMomentum
fn add(self, rhs: AngularMomentum) -> AngularMomentum
+ operation. Read moreSource§impl Add<&AngularMomentum> for &AngularMomentum
impl Add<&AngularMomentum> for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
+ operator.Source§fn add(self, rhs: &AngularMomentum) -> AngularMomentum
fn add(self, rhs: &AngularMomentum) -> AngularMomentum
+ operation. Read moreSource§impl Add<&AngularMomentum> for AngularMomentum
impl Add<&AngularMomentum> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
+ operator.Source§fn add(self, rhs: &AngularMomentum) -> AngularMomentum
fn add(self, rhs: &AngularMomentum) -> AngularMomentum
+ operation. Read moreSource§impl Add<AngularMomentum> for &AngularMomentum
impl Add<AngularMomentum> for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
+ operator.Source§fn add(self, rhs: AngularMomentum) -> AngularMomentum
fn add(self, rhs: AngularMomentum) -> AngularMomentum
+ operation. Read moreSource§impl Clone for AngularMomentum
impl Clone for AngularMomentum
Source§fn clone(&self) -> AngularMomentum
fn clone(&self) -> AngularMomentum
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AngularMomentum
impl Debug for AngularMomentum
Source§impl DiffWrt<Angle> for AngularMomentum
impl DiffWrt<Angle> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
Source§fn diff_wrt(&self, var: &Angle) -> AngularMomentum
fn diff_wrt(&self, var: &Angle) -> AngularMomentum
Source§impl DiffWrt<Time> for AngularMomentum
impl DiffWrt<Time> for AngularMomentum
Source§impl Display for AngularMomentum
impl Display for AngularMomentum
Source§impl Div<i64> for AngularMomentum
impl Div<i64> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
/ operator.Source§impl From<AngularMomentum> for Qty<AngularMomentumDim>
impl From<AngularMomentum> for Qty<AngularMomentumDim>
Source§fn from(q: AngularMomentum) -> Qty<AngularMomentumDim>
fn from(q: AngularMomentum) -> Qty<AngularMomentumDim>
Source§impl From<Qty<Dim<PInt<UInt<UInt<UTerm, B1>, B0>>, PInt<UInt<UTerm, B1>>, NInt<UInt<UTerm, B1>>, Z0, Z0, Z0, Z0>>> for AngularMomentum
impl From<Qty<Dim<PInt<UInt<UInt<UTerm, B1>, B0>>, PInt<UInt<UTerm, B1>>, NInt<UInt<UTerm, B1>>, Z0, Z0, Z0, Z0>>> for AngularMomentum
Source§fn from(q: Qty<AngularMomentumDim>) -> AngularMomentum
fn from(q: Qty<AngularMomentumDim>) -> AngularMomentum
Source§impl FromDimExpr<Dim<PInt<UInt<UInt<UTerm, B1>, B0>>, PInt<UInt<UTerm, B1>>, NInt<UInt<UTerm, B1>>, Z0, Z0, Z0, Z0>> for AngularMomentum
impl FromDimExpr<Dim<PInt<UInt<UInt<UTerm, B1>, B0>>, PInt<UInt<UTerm, B1>>, NInt<UInt<UTerm, B1>>, Z0, Z0, Z0, Z0>> for AngularMomentum
Source§fn from_dim_expr(qty: Qty<AngularMomentumDim>) -> Self
fn from_dim_expr(qty: Qty<AngularMomentumDim>) -> Self
Source§impl IntWrt<Angle> for AngularMomentum
impl IntWrt<Angle> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
Source§fn integrate_wrt(&self, var: &Angle) -> AngularMomentum
fn integrate_wrt(&self, var: &Angle) -> AngularMomentum
Source§impl IntWrt<AngularVelocity> for AngularMomentum
impl IntWrt<AngularVelocity> for AngularMomentum
Source§fn integrate_wrt(&self, var: &AngularVelocity) -> Energy
fn integrate_wrt(&self, var: &AngularVelocity) -> Energy
Source§impl Mul<&AngularMomentum> for i64
impl Mul<&AngularMomentum> for i64
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§fn mul(self, rhs: &AngularMomentum) -> AngularMomentum
fn mul(self, rhs: &AngularMomentum) -> AngularMomentum
* operation. Read moreSource§impl Mul<&Expr<Numeric>> for AngularMomentum
impl Mul<&Expr<Numeric>> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§impl Mul<&Expr<Numeric>> for &AngularMomentum
impl Mul<&Expr<Numeric>> for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§impl Mul<AngularMomentum> for i64
impl Mul<AngularMomentum> for i64
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§fn mul(self, rhs: AngularMomentum) -> AngularMomentum
fn mul(self, rhs: AngularMomentum) -> AngularMomentum
* operation. Read moreSource§impl Mul<AngularMomentum> for &Ex
impl Mul<AngularMomentum> for &Ex
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§fn mul(self, rhs: AngularMomentum) -> AngularMomentum
fn mul(self, rhs: AngularMomentum) -> AngularMomentum
* operation. Read moreSource§impl Mul<i64> for AngularMomentum
impl Mul<i64> for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§impl Mul<i64> for &AngularMomentum
impl Mul<i64> for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
* operator.Source§impl Neg for AngularMomentum
impl Neg for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
- operator.Source§fn neg(self) -> AngularMomentum
fn neg(self) -> AngularMomentum
- operation. Read moreSource§impl Neg for &AngularMomentum
impl Neg for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
- operator.Source§fn neg(self) -> AngularMomentum
fn neg(self) -> AngularMomentum
- operation. Read moreSource§impl Sub for AngularMomentum
impl Sub for AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
- operator.Source§fn sub(self, rhs: AngularMomentum) -> AngularMomentum
fn sub(self, rhs: AngularMomentum) -> AngularMomentum
- operation. Read moreSource§impl Sub<&AngularMomentum> for &AngularMomentum
impl Sub<&AngularMomentum> for &AngularMomentum
Source§type Output = AngularMomentum
type Output = AngularMomentum
- operator.Source§fn sub(self, rhs: &AngularMomentum) -> AngularMomentum
fn sub(self, rhs: &AngularMomentum) -> AngularMomentum
- operation. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AngularMomentum
impl !UnwindSafe for AngularMomentum
impl Freeze for AngularMomentum
impl Send for AngularMomentum
impl Sync for AngularMomentum
impl Unpin for AngularMomentum
impl UnsafeUnpin for AngularMomentum
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more