Dimension

public struct Dimension<N> : Equatable, CustomStringConvertible where N : Numeric

A generic type that stores a 2D dimenion (with width and height)

  • The width of the dimension

    Declaration

    Swift

    public var width: N
  • The height of the dimension

    Declaration

    Swift

    public var height: N
  • Creates a new instance of the Dimension object with the specified parameters

    Declaration

    Swift

    public init(width: N, height: N)

    Parameters

    width

    The width value of the dimension

    height

    The height value of the dimension

  • The description of the point

    Declaration

    Swift

    public var description: String { get }