Struct write_fonts::util::FloatComparator
source · pub struct FloatComparator { /* private fields */ }Expand description
Compare two floats for equality using relative and absolute tolerances.
This is useful when porting from Python where math.isclose is common.
References:
Implementations§
Trait Implementations§
source§impl Clone for FloatComparator
impl Clone for FloatComparator
source§fn clone(&self) -> FloatComparator
fn clone(&self) -> FloatComparator
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for FloatComparator
impl Debug for FloatComparator
source§impl Default for FloatComparator
impl Default for FloatComparator
impl Copy for FloatComparator
Auto Trait Implementations§
impl RefUnwindSafe for FloatComparator
impl Send for FloatComparator
impl Sync for FloatComparator
impl Unpin for FloatComparator
impl UnwindSafe for FloatComparator
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<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere U: FromObjRef<T>,
source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.