[−][src]Struct uncertainty::unc::Unc
A fieldless struct only used to instantiate AbUnc and RelUnc values.
Methods
impl Unc
[src]
pub fn ab(val: f64, unc: f64) -> AbUnc
[src]
Create an absolute uncertainty. The first parameter is the base value, and the second parameter is the absolute uncertainty in that value.
Examples
use uncertainty::*; let u: AbUnc = Unc::ab(10.0, 1.0); assert_eq!(u.val(), 10.0); assert_eq!(u.unc(), 1.0);
pub fn rel(val: f64, unc: f64) -> RelUnc
[src]
Create a relative uncertainty. The first parameter is the base value, and the second parameter is the relative uncertainty in the value, expressed as a decimal fraction.
Examples
use uncertainty::*; let u: RelUnc = Unc::rel(10.0, 0.1); assert_eq!(u.val(), 10.0); assert_eq!(u.unc(), 0.1);
Auto Trait Implementations
impl Send for Unc
impl Unpin for Unc
impl Sync for Unc
impl UnwindSafe for Unc
impl RefUnwindSafe for Unc
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,