Skip to content

Commit

Permalink
Remove UIKit
Browse files Browse the repository at this point in the history
  • Loading branch information
bevan667 committed Mar 22, 2021
1 parent aa07ca0 commit a3246e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Sources/SwiftSimplify/Point2DRepresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import UIKit
//import UIKit
import CoreLocation

public protocol Point2DRepresentable {
var xValue: Float { get }
var yValue: Float { get }

var cgPoint: CGPoint { get }
//var cgPoint: CGPoint { get }

func distanceFrom(_ otherPoint: Self) -> Float
func distanceToSegment(_ p1: Self, _ p2: Self) -> Float
Expand Down Expand Up @@ -86,12 +86,14 @@ extension CLLocationCoordinate2D: Point2DRepresentable {
public var xValue: Float { Float(latitude) }
public var yValue: Float { Float(longitude) }

public var cgPoint: CGPoint { CGPoint(x: latitude, y: longitude) }
//public var cgPoint: CGPoint { CGPoint(x: latitude, y: longitude) }
}

/*
extension CGPoint: Point2DRepresentable {
public var xValue: Float { Float(x) }
public var yValue: Float { Float(y) }

public var cgPoint: CGPoint { self }
}
*/
4 changes: 3 additions & 1 deletion Sources/SwiftSimplify/UIBezierPath+CGPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

/*
import UIKit

// MARK: - UIBezierPath Extension
Expand Down Expand Up @@ -95,3 +95,5 @@ private extension CGPoint {
}

}

*/

0 comments on commit a3246e3

Please sign in to comment.