Struct truster::tuple::Tuple[][src]

pub struct Tuple { /* fields omitted */ }
Expand description

Tuple represents a 3D tuple. See the module’s documentation for more information.

Implementations

Returns a new tuple with the given components. You should use Tuple::point and Tuple::vector instead.

Returns a new point with the given coordinates.

Returns a new vector with the given coordinates.

Returns selfs x coordinate.

Returns selfs y coordinate.

Returns selfs z coordinate.

Returns selfs w coordinate.

Returns true if self represents a point, false otherwise.

Returns true if self represents a vector, false otherwise.

Returns the dot product between self and other. See the module’s documentation for examples. Only works for vectors, not points.

Returns the cross product between self and other. See the module’s documentation for examples. Only works for vectors, not points.

Returns the square of the euclidean norm of self. See the module’s documentation for examples. Only works for vectors, not points.

Returns the norm of self. See the module’s documentation for examples. Only works for vectors, not points.

Returns a vector in the same direction as self, but with euclidean norm of one. See the module’s documentation for examples. Only works for vectors, not points.

Changes self to have a euclidean norm of one, while keeping its direction. See the module’s documentation for examples. Only works for vectors, not points.

Reflects self along normal

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

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

This method tests for !=.

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.