for tickNumber in 0...numberOfMajorTicks {
let val = CGFloat(tickNumber) * divider
let finalTickVal = angleForValue(CGFloat(val))
majorTickValuesArray.append(Int(finalTickVal))
}
with error: Thread 1: Swift runtime failure: Double value cannot be converted to Int because it is either infinite or NaN
falls in
for tickNumber in 0...numberOfMajorTicks { let val = CGFloat(tickNumber) * divider let finalTickVal = angleForValue(CGFloat(val)) majorTickValuesArray.append(Int(finalTickVal)) } with error: Thread 1: Swift runtime failure: Double value cannot be converted to Int because it is either infinite or NaN