Skip to main content

IsRectangle

Trait IsRectangle 

Source
pub trait IsRectangle<'a, T: IsPoint, N: IsUnitVector>: IsPolygon<'a, T, N> {
    // Required methods
    fn width(&self) -> GeometryMeasure;
    fn height(&self) -> GeometryMeasure;
    fn diagonal(&self) -> GeometryMeasure;
}
Expand description

A rectangle specialization of IsPolygon.

Required Methods§

Source

fn width(&self) -> GeometryMeasure

Returns the rectangle width.

Source

fn height(&self) -> GeometryMeasure

Returns the rectangle height.

Source

fn diagonal(&self) -> GeometryMeasure

Returns the rectangle diagonal length.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§