metaballs/MetaballsKit/Math/Geometry.swift

25 lines
438 B
Swift
Raw Normal View History

2017-08-05 11:09:03 -07:00
//
// Geometry.swift
// Metaballs
//
// Created by Eryn Wells on 8/5/17.
// Copyright © 2017 Eryn Wells. All rights reserved.
//
import Foundation
2018-10-07 19:32:29 -07:00
import simd
2017-08-05 11:09:03 -07:00
2018-10-07 19:32:29 -07:00
public typealias Size = packed_uint2
2018-10-07 19:32:29 -07:00
extension Size {
public init(size: CGSize) {
2018-10-07 19:32:29 -07:00
self.init(UInt32(size.width), UInt32(size.height))
}
}
extension Size: CustomStringConvertible {
public var description: String {
2018-10-07 19:32:29 -07:00
return "(\(x), \(y))"
2017-08-05 13:38:46 -07:00
}
}