Struct rust_3d::norm_2d::Norm2D [] [src]

pub struct Norm2D {
    pub x: f64,
    pub y: f64,
}

Norm2D, a normalized vector within 2D space

Fields

Trait Implementations

impl PartialEq for Norm2D
[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 Norm2D
[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 Eq for Norm2D
[src]

impl Ord for Norm2D
[src]

This method returns an Ordering between self and other. Read more

impl Hash for Norm2D
[src]

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

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

impl Clone for Norm2D
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl IsND for Norm2D
[src]

Should return the number of dimensions. E.g. 2 for points in 2D space, 3 for points in 3D space etc.

Should return the value of a given dimensions. E.g. for 2D position with x = 4.3, y = 1.8 the result for dimension = 1 should be 1.8

impl Is2D for Norm2D
[src]

Should return the x-coordinate

Should return the y-coordinate

Returns the Position as x,y tuple

Calculates the dot product with another Is2D

Calculates the cross product with another Is2D

The absolute / length of this position

Calculates the angle to the other Is2D in radians

Transforms the position in a "x y" string. E.g. "3.72 5.99"

impl IsNormalized2D for Norm2D
[src]

Should return a new normalized object

Should return a new normalized object which only points in the x-Direction

Should return a new normalized object which only points in the y-Direction