Struct rink::number::Number [] [src]

pub struct Number {
    pub value: Num,
    pub unit: Unit,
}

The basic representation of a number with a unit.

Fields

Methods

impl Number
[src]

Creates a dimensionless value.

Creates a value with a single dimension.

Computes the reciprocal (1/x) of the value.

Raises a value to a dimensionless integer power.

Computes the nth root of a value iff all of its units have powers divisible by n.

Convert the units of the number from base units to display units, and possibly apply SI prefixes.

Trait Implementations

impl Clone for Number
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Number
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Number
[src]

Formats the value using the given formatter.

impl Show for Number
[src]

Provides a string representation of something, using information contained in a Context.

impl<'a, 'b> Add<&'b Number> for &'a Number
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Sub<&'b Number> for &'a Number
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Neg for &'a Number
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, 'b> Mul<&'b Number> for &'a Number
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b> Div<&'b Number> for &'a Number
[src]

The resulting type after applying the / operator

The method for the / operator