pub struct Fast<F>(/* private fields */);
Expand description
“fast-math” wrapper for f32 and f64.
The Fast
type enforces no invariant and can hold any f32, f64 values.
See crate docs for more details.
Implementations§
Source§impl<F> Fast<F>
impl<F> Fast<F>
Sourcepub unsafe fn new(value: F) -> Self
pub unsafe fn new(value: F) -> Self
Create a new fast value
§Safety
The value can be used with the fast_fadd
etc intrinsics without checks after it has been
created like this. Refer to Rust and other sources for documentation on which operations
are valid (might change with time).
Be wary of operations creating invalid values in Fast
which they could potentially do
depending on the operation.
Trait Implementations§
Source§impl<F, Rhs> AddAssign<Rhs> for Fast<F>
impl<F, Rhs> AddAssign<Rhs> for Fast<F>
Source§fn add_assign(&mut self, rhs: Rhs)
fn add_assign(&mut self, rhs: Rhs)
Performs the
+=
operation. Read moreSource§impl<F, Rhs> DivAssign<Rhs> for Fast<F>
impl<F, Rhs> DivAssign<Rhs> for Fast<F>
Source§fn div_assign(&mut self, rhs: Rhs)
fn div_assign(&mut self, rhs: Rhs)
Performs the
/=
operation. Read moreSource§impl<F, Rhs> MulAssign<Rhs> for Fast<F>
impl<F, Rhs> MulAssign<Rhs> for Fast<F>
Source§fn mul_assign(&mut self, rhs: Rhs)
fn mul_assign(&mut self, rhs: Rhs)
Performs the
*=
operation. Read moreSource§impl<F: PartialOrd> PartialOrd for Fast<F>
impl<F: PartialOrd> PartialOrd for Fast<F>
Source§impl<F, Rhs> RemAssign<Rhs> for Fast<F>
impl<F, Rhs> RemAssign<Rhs> for Fast<F>
Source§fn rem_assign(&mut self, rhs: Rhs)
fn rem_assign(&mut self, rhs: Rhs)
Performs the
%=
operation. Read moreSource§impl<F, Rhs> SubAssign<Rhs> for Fast<F>
impl<F, Rhs> SubAssign<Rhs> for Fast<F>
Source§fn sub_assign(&mut self, rhs: Rhs)
fn sub_assign(&mut self, rhs: Rhs)
Performs the
-=
operation. Read moreimpl<F: Copy> Copy for Fast<F>
impl<F> StructuralPartialEq for Fast<F>
Auto Trait Implementations§
impl<F> Freeze for Fast<F>where
F: Freeze,
impl<F> RefUnwindSafe for Fast<F>where
F: RefUnwindSafe,
impl<F> Send for Fast<F>where
F: Send,
impl<F> Sync for Fast<F>where
F: Sync,
impl<F> Unpin for Fast<F>where
F: Unpin,
impl<F> UnwindSafe for Fast<F>where
F: UnwindSafe,
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