pub struct Float(pub f64);Tuple Fields§
§0: f64Implementations§
Trait Implementations§
impl Copy for Float
Source§impl NumericOps for Float
impl NumericOps for Float
fn new(number: i64) -> Self
fn new_f64(number: f64) -> Self
fn value_of(self) -> i64
fn value_f64(self) -> f64
fn negate(self) -> Self
fn register_type(&self) -> RegisterType
fn add<T: NumericOps>(self, other: T) -> Self
fn subtract<T: NumericOps>(self, other: T) -> Self
fn multiply<T: NumericOps>(self, other: T) -> Self
Source§fn divide<T: NumericOps>(self, other: T) -> Self
fn divide<T: NumericOps>(self, other: T) -> Self
Truncating division
fn unit(&self) -> Option<&'static str>
fn pt_value(self, prec: Option<u8>) -> f64where
Self: Sized,
fn px_value(self, prec: Option<u8>) -> f64where
Self: Sized,
fn absolute(self) -> Selfwhere
Self: Sized,
fn sign(self) -> i8where
Self: Sized,
Source§fn divideround<T: NumericOps>(self, other: T) -> Selfwhere
Self: Sized,
fn divideround<T: NumericOps>(self, other: T) -> Selfwhere
Self: Sized,
Rounding division
fn smaller<T: NumericOps>(self, other: T) -> Selfwhere
Self: Sized,
fn larger<T: NumericOps>(self, other: T) -> Selfwhere
Self: Sized,
fn to_token(self) -> Tokenwhere
Self: Sized,
fn into_glue_type(self) -> Gluewhere
Self: Sized,
fn to_attribute(&self) -> Stringwhere
Self: Display,
Source§impl Object for Float
impl Object for Float
Source§fn revert(&self) -> Result<Tokens>
fn revert(&self) -> Result<Tokens>
each concrete object needs to provide its own path back to tokens
fn stringify(&self) -> String
fn be_digested(self) -> Result<Digested>
fn isa_box(&self) -> bool
fn is_expandable(&self) -> bool
fn is_definition(&self) -> bool
fn is_comment(&self) -> bool
Source§fn get_locator(&self) -> Option<Locator>
fn get_locator(&self) -> Option<Locator>
The object’s stored source locator, if it has one.
None is the honest
“no recorded source position” (replacing the old Locator::default()
file!()/line!() sentinel). For “where the parser is now” (error
reporting, box creation), use the free fn gullet::get_locator().impl StructuralPartialEq for Float
Auto Trait Implementations§
impl Freeze for Float
impl RefUnwindSafe for Float
impl Send for Float
impl Sync for Float
impl Unpin for Float
impl UnsafeUnpin for Float
impl UnwindSafe for Float
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