pub struct FigureGap {
pub figure: CheckedFigure,
pub file: f64,
pub stated: f64,
}Expand description
One figure of a curve file’s check: the file’s value and the motor’s stated one.
Fields§
§figure: CheckedFigureWhich figure.
file: f64The file’s value.
stated: f64ThrustCurve.org’s stated value.
Implementations§
Source§impl FigureGap
impl FigureGap
Sourcepub fn relative(&self) -> f64
pub fn relative(&self) -> f64
The signed relative gap, (file − stated) / stated: positive when the file’s figure is
the larger.
Sourcepub fn percent_text(&self) -> String
pub fn percent_text(&self) -> String
The signed gap in percent, as the warning and hpr motors show print it: two decimals,
and more for a figure that fails, so it never prints as within 1% (+1.004%, not
+1.00%). A failing gap so close to 1% that its quotient rounds to it prints as >+1% or
<-1%, and one against a stated figure that isn’t positive as n/a.
Sourcepub fn within_bound(&self) -> bool
pub fn within_bound(&self) -> bool
Whether the file’s figure is within CHECK_BOUND of the stated one,
|file − stated| ≤ 0.01 × stated. A stated figure that isn’t positive, or a NaN either
side, fails.
Trait Implementations§
impl Copy for FigureGap
impl StructuralPartialEq for FigureGap
Auto Trait Implementations§
impl Freeze for FigureGap
impl RefUnwindSafe for FigureGap
impl Send for FigureGap
impl Sync for FigureGap
impl Unpin for FigureGap
impl UnsafeUnpin for FigureGap
impl UnwindSafe for FigureGap
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