Trait sark_grids::point::GridPoint
source · [−]pub trait GridPoint: Clone + Copy {
fn x(&self) -> i32;
fn y(&self) -> i32;
fn aligned(&self, size: impl Size2d) -> IVec2;
fn as_ivec2(&self) -> IVec2 { ... }
fn as_uvec2(&self) -> UVec2 { ... }
fn as_vec2(&self) -> Vec2 { ... }
fn to_array(&self) -> [i32; 2] { ... }
fn pivot(&self, pivot: Pivot) -> PivotedPoint { ... }
}
Expand description
A trait for an integer point on a 2d grid.
Required Methods
Provided Methods
fn pivot(&self, pivot: Pivot) -> PivotedPoint
fn pivot(&self, pivot: Pivot) -> PivotedPoint
Return a PivotedPoint.