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]

[src]

Creates a new Positive if input > 0, fails otherwise

[src]

Creates a new Positive with value 1

[src]

Returns the wrapped value

[src]

Returns the square root

Trait Implementations

impl Debug for Positive
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Positive
[src]

[src]

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

[src]

This method tests for !=.

impl PartialOrd for Positive
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Positive
[src]

impl Hash for Positive
[src]

[src]

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

1.3.0
[src]

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

impl Add for Positive
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Add<NonNegative> for Positive
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Default for Positive
[src]

[src]

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

impl Display for Positive
[src]

[src]

Formats the value using the given formatter. Read more

impl From<Positive> for NonNegative
[src]

[src]

Performs the conversion.

impl Add<Positive> for NonNegative
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Mul<Positive> for NonNegative
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<Positive> for NonNegative
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

Auto Trait Implementations

impl Send for Positive

impl Sync for Positive