Struct bracket_terminal::prelude::Point[][src]

pub struct Point {
    pub x: i32,
    pub y: i32,
}
Expand description

Helper struct defining a 2D point in space.

Fields

x: i32y: i32

Implementations

Create a new point from an x/y coordinate.

Create a new point from i32, this can be constant

Helper for map index conversion

Converts the point to an i32 tuple

Converts the point to a usize tuple

Converts the point to an UltraViolet vec2

Creates a point from an UltraViolet vec2

Trait Implementations

Overloads: We support basic point math Support adding a point to a point

The resulting type after applying the + operator.

Performs the + operation. Read more

Support adding an int to a point

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

Support dividing a point by a point

The resulting type after applying the / operator.

Performs the / operation. Read more

Support dividing a point by an f32

The resulting type after applying the / operator.

Performs the / operation. Read more

Support dividing a point by an int

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Feeds this value into the given Hasher. Read more

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

Support multiplying a point by a point

The resulting type after applying the * operator.

Performs the * operation. Read more

Support multiplying a point by an f32

The resulting type after applying the * operator.

Performs the * operation. Read more

Support multiplying a point by an int

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

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

This method tests for !=.

Support subtracting a point from a point

The resulting type after applying the - operator.

Performs the - operation. Read more

Support subtracting an int from a point

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

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.