pub struct Map {
pub a: i128,
pub b: i128,
pub d: i128,
pub between: Between,
}Expand description
Reader sample n reads source sample (a*n + b)/d, d > 0: exactly, or rounded down or
to the nearest, ties to even. An exact map is whole, d = 1; nothing reads between samples.
Fields§
§a: i128§b: i128§d: i128§between: BetweenImplementations§
Source§impl Map
impl Map
pub const fn shift(b: i64) -> Map
Sourcepub fn new(a: i128, b: i128, d: i128) -> Option<Map>
pub fn new(a: i128, b: i128, d: i128) -> Option<Map>
Lowest terms; None where a sample lands between two, or past what a map holds.
Sourcepub fn rounded(a: i128, b: i128, d: i128, between: Between) -> Option<Map>
pub fn rounded(a: i128, b: i128, d: i128, between: Between) -> Option<Map>
A rounding every sample takes alike is folded into an exact map.
pub fn at(self, n: i64) -> i64
pub fn ahead(self) -> bool
pub fn lead(self) -> i64
pub fn least(self) -> i64
pub fn image(self, over: Extent) -> Extent
Trait Implementations§
impl Copy for Map
impl Eq for Map
Source§impl Ord for Map
impl Ord for Map
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Map
impl PartialOrd for Map
impl StructuralPartialEq for Map
Auto Trait Implementations§
impl Freeze for Map
impl RefUnwindSafe for Map
impl Send for Map
impl Sync for Map
impl Unpin for Map
impl UnsafeUnpin for Map
impl UnwindSafe for Map
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