Type Alias lowdim::Point4d

source ·
pub type Point4d<S = i64> = Point<S, Vec4d<S>>;
Expand description

A 4d point.

Aliased Type§

struct Point4d<S = i64> { /* private fields */ }

Implementations§

source§

impl<S: Integer> Point4d<S>

source

pub fn new(x: S, y: S, z: S, w: S) -> Self

Creates a new point with the given coordinates.

source

pub fn x(&self) -> S

Returns the x coordinate of the point.

Examples
let p = p4d(2, 3, -1, 4);
assert_eq!(2, p.x());
source

pub fn y(&self) -> S

Returns the y coordinate of the point.

Examples
let p = p4d(2, 3, -1, 4);
assert_eq!(3, p.y());
source

pub fn z(&self) -> S

Returns the z coordinate of the point.

Examples
let p = p4d(2, 3, -1, 4);
assert_eq!(-1, p.z());
source

pub fn w(&self) -> S

Returns the w coordinate of the point.

Examples
let p = p4d(2, 3, -1, 4);
assert_eq!(4, p.w());