pub enum FloorRule {
Shift,
Scaled,
}Expand description
How ⌊ and ⌈ read a value that is merely near the integer above or
below it.
GNU APL shifts by ⎕CT outright, so ⌊99.999999999995 is 99 — a gap
of 5E¯12 is larger than the tolerance however big the value is — while
⌊¯1E¯13 is 0. Dyalog scales the shift by the magnitude but never
below 1, so ⌊9.9999999999999 is 10 and ⌊¯1E¯13 is ¯1.
Variants§
Shift
GNU APL: ⌊y+⎕CT, an absolute shift.
Scaled
Dyalog: ⌊y+⎕CT×1⌈|y, a shift that grows with the magnitude.
Trait Implementations§
impl Copy for FloorRule
impl Eq for FloorRule
impl StructuralPartialEq for FloorRule
Auto Trait Implementations§
impl Freeze for FloorRule
impl RefUnwindSafe for FloorRule
impl Send for FloorRule
impl Sync for FloorRule
impl Unpin for FloorRule
impl UnsafeUnpin for FloorRule
impl UnwindSafe for FloorRule
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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