ClassicComputerScienceProblemsInSwift icon indicating copy to clipboard operation
ClassicComputerScienceProblemsInSwift copied to clipboard

could use swift random (swift 4.2)

Open ctholho opened this issue 6 years ago • 1 comments

Line 145 and line 155 could be updated to use Float.random(in: 0 ... 1) https://github.com/davecom/ClassicComputerScienceProblemsInSwift/blob/3773196cbd3c29bdc09a066c48c7a86b06c7856b/Classic%20Computer%20Science%20Problems%20in%20Swift.playground/Pages/Chapter%202.xcplaygroundpage/Contents.swift#L145

ctholho avatar Jun 09 '19 20:06 ctholho

Yup, but the book was written before Swift 4.2, and we don't want the code here to get out of sync with the print edition.

davecom avatar Jun 09 '19 20:06 davecom