This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// Swift rewrite challenge by Erica Sadun: http://ericasadun.com/2016/05/31/swift-rewrite-challenge/ | |
// Starting point: https://gist.github.com/erica/157e20ea0c7e9f28a03a8b12448c8fd0 | |
// My solution builds on a small framework I have written with some geometry extensions on CGVector, CGPoint, CGRect and CGSize | |
// I call it GeometryKit and include the relevant parts here. This makes geometric calculations so much easier to understand. | |
// ------------------------------------------------------------------------------------ |