Struct axle::Point [] [src]

pub struct Point { /* fields omitted */ }

Immutable point type, consisting of x and y.

Methods

impl Point
[src]

[src]

Creates a new point from the given coordinates.

[src]

[src]

[src]

[src]

Returns a new point by shifting this point's coordinates by the given x and y values.

[src]

Returns a new point by multiplying this point's coordinates by the given scale factor.

[src]

Returns the x-coordinate of this point.

[src]

Returns the y-coordinate of this point.

Trait Implementations

impl Neg for Point
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl AsRef<SDL_Point> for Point
[src]

[src]

Performs the conversion.

impl Copy for Point
[src]

impl DerefMut for Point
[src]

[src]

Example

use sdl2::rect::Point;
let mut point = Point::new(2, 3);
point.x = 4;
assert_eq!(4, point.x);

impl PartialEq<Point> for Point
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Mul<i32> for Point
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Debug for Point
[src]

[src]

Formats the value using the given formatter. Read more

impl Eq for Point
[src]

impl From<(i32, i32)> for Point
[src]

[src]

Performs the conversion.

impl From<SDL_Point> for Point
[src]

[src]

Performs the conversion.

impl Div<i32> for Point
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Add<Point> for Point
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Clone for Point
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Sub<Point> for Point
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Into<(i32, i32)> for Point
[src]

[src]

Performs the conversion.

impl Into<SDL_Point> for Point
[src]

[src]

Performs the conversion.

impl AsMut<SDL_Point> for Point
[src]

[src]

Performs the conversion.

impl Deref for Point
[src]

The resulting type after dereferencing.

[src]

Example

use sdl2::rect::Point;
let point = Point::new(2, 3);
assert_eq!(2, point.x);

Auto Trait Implementations

impl Send for Point

impl Sync for Point