devela::num::geom

Type Alias Extent2d

Source
pub type Extent2d<T> = Extent<T, 2>;
Available on crate feature geom only.
Expand description

A 2-dimensional Extent.

Aliased Type§

struct Extent2d<T> { /* private fields */ }

Implementations§

Source§

impl<T> Extent2d<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 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 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 is_uniform(&self) -> bool
where T: PartialEq,

Returns true if the 2 dimensions of the extent are equal.

Source§

impl Extent2d<i8>

Source

pub const fn c_area(self) -> i8

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> i8

The perimeter of the 2d extent.

Source§

impl Extent2d<i16>

Source

pub const fn c_area(self) -> i16

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> i16

The perimeter of the 2d extent.

Source§

impl Extent2d<i32>

Source

pub const fn c_area(self) -> i32

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> i32

The perimeter of the 2d extent.

Source§

impl Extent2d<i64>

Source

pub const fn c_area(self) -> i64

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> i64

The perimeter of the 2d extent.

Source§

impl Extent2d<i128>

Source

pub const fn c_area(self) -> i128

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> i128

The perimeter of the 2d extent.

Source§

impl Extent2d<isize>

Source

pub const fn c_area(self) -> isize

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> isize

The perimeter of the 2d extent.

Source§

impl Extent2d<u8>

Source

pub const fn c_area(self) -> u8

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> u8

The perimeter of the 2d extent.

Source§

impl Extent2d<u16>

Source

pub const fn c_area(self) -> u16

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> u16

The perimeter of the 2d extent.

Source§

impl Extent2d<u32>

Source

pub const fn c_area(self) -> u32

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> u32

The perimeter of the 2d extent.

Source§

impl Extent2d<u64>

Source

pub const fn c_area(self) -> u64

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> u64

The perimeter of the 2d extent.

Source§

impl Extent2d<u128>

Source

pub const fn c_area(self) -> u128

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> u128

The perimeter of the 2d extent.

Source§

impl Extent2d<usize>

Source

pub const fn c_area(self) -> usize

The area of the 2d extent.

Source

pub const fn c_perimeter(self) -> usize

The perimeter of the 2d extent.

Source§

impl Extent2d<f32>

Source

pub const fn area(self) -> f32

The area of the 2d extent.

Source

pub const fn perimeter(self) -> f32

The perimeter of the 2d extent.

Source§

impl Extent2d<f64>

Source

pub const fn area(self) -> f64

The area of the 2d extent.

Source

pub const fn perimeter(self) -> f64

The perimeter of the 2d extent.