Skip to content

Commit

Permalink
fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hfutrell committed Nov 16, 2019
1 parent 77697ab commit 0f2663d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BezierKit/Library/BezierCurve.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ extension BezierCurve {

public func extrema() -> (xyz: [[CGFloat]], values: [CGFloat] ) {
let xyz = self.internalExtrema(includeInflection: true)
var roots = xyz.joined().sorted() // the roots for each dimension, flattened and sorted
let roots = xyz.joined().sorted() // the roots for each dimension, flattened and sorted
var values: [CGFloat] = []
if !roots.isEmpty {
values.reserveCapacity(roots.count)
Expand Down Expand Up @@ -251,9 +251,9 @@ extension BezierCurve {
r2 = distanceFunction(1)
}

var v = [ self.internalOffset(t: 0, distance: 1), self.internalOffset(t: 1, distance: 1) ]
let v = [ self.internalOffset(t: 0, distance: 1), self.internalOffset(t: 1, distance: 1) ]
// move all points by distance 'd' wrt the origin 'o'
var points: [CGPoint] = self.points
let points: [CGPoint] = self.points
var np: [CGPoint] = [CGPoint](repeating: .zero, count: self.order + 1)

// move end points by fixed distance along normal.
Expand Down

0 comments on commit 0f2663d

Please sign in to comment.