Rectangle
public struct Rectangle<N> : Equatable, CustomStringConvertible where N : Numeric
A generic type that captrues a rectangular region in 2D space with an origin and size
-
The origin of the rectangle
Declaration
Swift
public var origin: Point<N> -
The size of the rectangle
Declaration
Swift
public var size: Dimension<N> -
Creates a new instance with individual parameters for the origin and size
Declaration
Swift
public init(x: N, y: N, width: N, height: N)Parameters
xThe origin x coordinate
yThe origin y coordinate
widthThe width of the rectangle
heightThe height of the rectangle
-
The description of the rectangle
Declaration
Swift
public var description: String { get }
View on GitHub
Rectangle Structure Reference