Size

public struct Size
extension Size: Zero
extension Size: Equatable

Model of rectangular size.

Instance Properties

  • Width.

    Declaration

    Swift

    public let width: Double
  • Height.

    Declaration

    Swift

    public let height: Double

Initializers

  • Creates a Size with the given width and height.

    Declaration

    Swift

    public init(width: Double = 0, height: Double = 0)
  • Declaration

    Swift

    public func scaled(by value: Double) -> Size

    Return Value

    a Size with both dimensions scaled by the same value.

  • Declaration

    Swift

    public func scaledBy(width widthScale: Double = 1, height heightScale: Double = 1) -> Size

    Return Value

    a Size scaled by the given dimensions.

  • Declaration

    Swift

    public func scaled(by size: Size) -> Size

    Return Value

    a Size scaled by the dimensions of size.

  • Declaration

    Swift

    public static var zero: Size { get }