Skip to main content

Extent2

Type Alias Extent2 

Source
pub type Extent2<T> = Extent<T, 2>;
Expand description

๐Ÿ“ A 2-dimensional Extent.


๐Ÿ“ geom/metric


Aliased Typeยง

#[repr(transparent)]
pub struct Extent2<T> { pub dim: [T; 2], }

Fieldsยง

ยงdim: [T; 2]

The size values in D-dimensional space.

Implementationsยง

Sourceยง

impl Extent2<i8>

Source

pub const fn area(self) -> i8

The area of the 2d extent.

Source

pub const fn perimeter(self) -> i8

The perimeter of the 2d extent.

Sourceยง

impl Extent2<i16>

Source

pub const fn area(self) -> i16

The area of the 2d extent.

Source

pub const fn perimeter(self) -> i16

The perimeter of the 2d extent.

Sourceยง

impl Extent2<i32>

Source

pub const fn area(self) -> i32

The area of the 2d extent.

Source

pub const fn perimeter(self) -> i32

The perimeter of the 2d extent.

Sourceยง

impl Extent2<i64>

Source

pub const fn area(self) -> i64

The area of the 2d extent.

Source

pub const fn perimeter(self) -> i64

The perimeter of the 2d extent.

Sourceยง

impl Extent2<i128>

Source

pub const fn area(self) -> i128

The area of the 2d extent.

Source

pub const fn perimeter(self) -> i128

The perimeter of the 2d extent.

Sourceยง

impl Extent2<isize>

Source

pub const fn area(self) -> isize

The area of the 2d extent.

Source

pub const fn perimeter(self) -> isize

The perimeter of the 2d extent.

Sourceยง

impl Extent2<u8>

Source

pub const fn area(self) -> u8

The area of the 2d extent.

Source

pub const fn perimeter(self) -> u8

The perimeter of the 2d extent.

Sourceยง

impl Extent2<u16>

Source

pub const fn area(self) -> u16

The area of the 2d extent.

Source

pub const fn perimeter(self) -> u16

The perimeter of the 2d extent.

Sourceยง

impl Extent2<u32>

Source

pub const fn area(self) -> u32

The area of the 2d extent.

Source

pub const fn perimeter(self) -> u32

The perimeter of the 2d extent.

Sourceยง

impl Extent2<u64>

Source

pub const fn area(self) -> u64

The area of the 2d extent.

Source

pub const fn perimeter(self) -> u64

The perimeter of the 2d extent.

Sourceยง

impl Extent2<u128>

Source

pub const fn area(self) -> u128

The area of the 2d extent.

Source

pub const fn perimeter(self) -> u128

The perimeter of the 2d extent.

Sourceยง

impl Extent2<usize>

Source

pub const fn area(self) -> usize

The area of the 2d extent.

Source

pub const fn perimeter(self) -> usize

The perimeter of the 2d extent.

Sourceยง

impl Extent2<f32>

Source

pub const fn area(self) -> f32

Returns the area of the 2d extent.

Source

pub const fn perimeter(self) -> f32

Returns the perimeter of the 2d extent.

Sourceยง

impl Extent2<f64>

Source

pub const fn area(self) -> f64

Returns the area of the 2d extent.

Source

pub const fn perimeter(self) -> f64

Returns the perimeter of the 2d extent.

Sourceยง

impl<T: Copy> Extent2<T>

2D Accessors

Source

pub const fn width(self) -> T

Returns a copy of the horizontal dimension (X-axis).

Source

pub const fn w(self) -> T

Returns a copy of the horizontal dimension (X-axis).

Source

pub const fn height(self) -> T

Returns a copy of the vertical dimension (Y-axis).

Source

pub const fn h(self) -> T

Returns a copy of the vertical dimension (Y-axis).

Source

pub const fn length(self) -> T

Returns a copy of the horizontal dimension (X-axis) (width).

Source

pub const fn l(self) -> T

Returns a copy of the horizontal dimension (X-axis) (width).

Source

pub const fn breadth(self) -> T

Returns a copy of the vertical dimension (Y-axis) (width).

Source

pub const fn b(self) -> T

Returns a copy of the vertical dimension (Y-axis) (width).