pub struct DistanceMapping { /* private fields */ }Expand description
Linear mapping of signed distance values into normalized field values.
Implementations§
Source§impl DistanceMapping
impl DistanceMapping
Sourcepub fn from_range(range: Range) -> Self
pub fn from_range(range: Range) -> Self
Maps [range.lower, range.upper] onto [0, 1].
Sourcepub fn inverse_of_range(range: Range) -> Self
pub fn inverse_of_range(range: Range) -> Self
The inverse mapping that takes a range back from normalized values.
pub fn inverse(&self) -> Self
Trait Implementations§
Source§impl Clone for DistanceMapping
impl Clone for DistanceMapping
Source§fn clone(&self) -> DistanceMapping
fn clone(&self) -> DistanceMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DistanceMapping
Source§impl Debug for DistanceMapping
impl Debug for DistanceMapping
Auto Trait Implementations§
impl Freeze for DistanceMapping
impl RefUnwindSafe for DistanceMapping
impl Send for DistanceMapping
impl Sync for DistanceMapping
impl Unpin for DistanceMapping
impl UnsafeUnpin for DistanceMapping
impl UnwindSafe for DistanceMapping
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> 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>
Converts
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>
Converts
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