Skip to content

Commit

Permalink
remove point classifiable.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfutrell committed Jun 28, 2022
1 parent 88f16ff commit 4b7c4b8
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
5 changes: 0 additions & 5 deletions BezierKit/Library/BezierCurve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,6 @@ public protocol BezierCurve: BoundingBoxProtocol, Transformable, Reversible {
func intersections(with curve: BezierCurve, accuracy: CGFloat) -> [Intersection]
}

internal protocol PointClassifiable {
/// returns true if all control points are equal
var isPoint: Bool { get }
}

internal protocol NonlinearBezierCurve: BezierCurve, ComponentPolynomials, Implicitizeable, PointClassifiable {
// intentionally empty, just declare conformance if you're not a line
}
Expand Down
4 changes: 0 additions & 4 deletions BezierKit/Library/CubicCurve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,3 @@ extension CubicCurve: Flatness {
return (1.0 / 16.0) * ( temp1 + temp2 )
}
}

extension CubicCurve: PointClassifiable {
var isPoint: Bool { return self.p0 == self.p1 && self.p1 == self.p2 && self.p2 == self.p3 }
}
4 changes: 0 additions & 4 deletions BezierKit/Library/LineSegment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,3 @@ extension LineSegment: Flatness {
public var flatnessSquared: CGFloat { return 0.0 }
public var flatness: CGFloat { return 0.0 }
}

extension LineSegment: PointClassifiable {
var isPoint: Bool { return self.p0 == self.p1 }
}
4 changes: 0 additions & 4 deletions BezierKit/Library/QuadraticCurve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,3 @@ extension QuadraticCurve: Flatness {
return (1.0 / 16.0) * (a.x * a.x + a.y * a.y)
}
}

extension QuadraticCurve: PointClassifiable {
var isPoint: Bool { return self.p0 == self.p1 && self.p1 == self.p2 }
}

0 comments on commit 4b7c4b8

Please sign in to comment.