devela::num::geom

Type Alias Point3d

Source
pub type Point3d<T> = Point<T, 3>;
Available on crate feature geom only.
Expand description

A specific position in 3d-space without a size.

Aliased Type§

struct Point3d<T> {
    pub coords: [T; 3],
}

Fields§

§coords: [T; 3]

The D-dimensional coordinates.

Implementations§

Source§

impl<T> Point3d<T>

Source

pub const fn x(self) -> T
where T: Copy,

Returns a copy of the first dimension x.

Source

pub const fn y(self) -> T
where T: Copy,

Returns a copy of the second dimension y.

Source

pub const fn z(self) -> T
where T: Copy,

Returns a copy of the third dimension z.

Source

pub const fn x_ref(&self) -> &T

Returns a shared reference to the first dimension x.

Source

pub const fn y_ref(&self) -> &T

Returns a shared reference to the second dimension y.

Source

pub const fn z_ref(&self) -> &T

Returns a shared reference to the third dimension z.

Source

pub fn x_mut(&mut self) -> &mut T

Returns an exclusive reference to the first dimension x.

Source

pub fn y_mut(&mut self) -> &mut T

Returns an exclusive reference to the second dimension y.

Source

pub fn z_mut(&mut self) -> &mut T

Returns an exclusive reference to the third dimension z.