Ramshandilya / Bezier

Algorithm to draw smooth bezier curves through a set of points
MIT License
233 stars 35 forks source link

Swift 3 #1

Open manugupta9228 opened 7 years ago

manugupta9228 commented 7 years ago

CubicCurveALgorithm.swift is not compatible with swift 3 syntax

stoeckley commented 7 years ago

It's a very minor fix if you just use the Xcode syntax conversion feature... it's only a few minor automatic changes.

petkrein commented 7 years ago

The Xcode (8.3.3) syntax conversion is not able to fix a line in "CubicCurveAlgorithm.swift":

Line 123:
for var i=count-2; i>=0; i -= 1 {

You have to replace it manually with: for i in (0 ..< count - 1).reversed() {

stoeckley commented 7 years ago

That's interesting, I wonder why the earlier versions of syntax conversion worked on all of the lines, but not the version you are using?

petkrein commented 7 years ago

An swift 3 syntax upgrade for your nice Algorithm would be desireable ;)