๐CGSize
import SwiftUI
// ๐CGSize + ๐
ฟ๏ธ Rectangular
extension CGSize: Rectangular {
public var origin: CGPoint { .zero }
public var size : CGSize { self }
}
// ๐CGSize + ๐
ฟ๏ธ Vector2D
extension CGSize: Vector2D {
public var x: CGFloat { width }
public var y: CGFloat { height }
public init(x: CGFloat, y: CGFloat) {
self.init(width: x, height: y)
}
}
Last updated