Last active
January 19, 2019 22:17
-
-
Save almaleh/88dadc980232eeedea6e5ec2eb4180c1 to your computer and use it in GitHub Desktop.
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
func checkIfTooManyPoints() { | |
let maxPoints = 25 | |
if line.count > maxPoints { | |
updateFlattenedLayer() | |
// we leave two points to ensure no gaps or sharp angles | |
_ = line.removeFirst(maxPoints - 2) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment