Type Alias nalgebra::geometry::Point2

source ·
pub type Point2<T> = Point<T, 2>;
Expand description

A statically sized 2-dimensional column point.

Because this is an alias, not all its methods are listed here. See the Point type too.

Aliased Type§

struct Point2<T> {
    pub coords: Matrix<T, Const<2>, Const<1>, <DefaultAllocator as Allocator<T, Const<2>>>::Buffer>,
}

Fields§

§coords: Matrix<T, Const<2>, Const<1>, <DefaultAllocator as Allocator<T, Const<2>>>::Buffer>

The coordinates of this point, i.e., the shift from the origin.

Implementations§

source§

impl<T: Scalar> Point2<T>

source

pub const fn new(x: T, y: T) -> Self

Initializes this point from its components.

§Example
let p = Point2::new(1.0, 2.0);
assert!(p.x == 1.0 && p.y == 2.0);