Struct rust_3d::Positive [] [src]

pub struct Positive { /* fields omitted */ }

Positive, a wrapper for a f64 value, ensuring it is always > 0

Methods

impl Positive
[src]

Creates a new Positive if input > 0, fails otherwise

Creates a new Positive with value 1

Returns the wrapped value

Returns the square root

Trait Implementations

impl Debug for Positive
[src]

Formats the value using the given formatter.

impl PartialEq for Positive
[src]

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

This method tests for !=.

impl PartialOrd for Positive
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Clone for Positive
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Positive
[src]

impl Hash for Positive
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Add for Positive
[src]

The resulting type after applying the + operator

The method for the + operator

impl Add<NonNegative> for Positive
[src]

The resulting type after applying the + operator

The method for the + operator

impl Default for Positive
[src]

Returns the "default value" for a type. Read more

impl Display for Positive
[src]

Formats the value using the given formatter. Read more