Swift: Random number for 64-bit integers?
问题 So, with my current project, I need to work with 64-bit integers and I need to grab random numbers between ranges up to 100 billion. arc4random()/arc4random_uniform() only works with unsigned 32-bit integers. I can probably fudge it a little because my min/max range for every call will likely not exceed 2 billion, but I'd like to futureproof myself in case I decide that, well, I do need a broader range. Any advice? 回答1: Update: As of Swift 4.2 (distributed with Xcode 10.1) there is a unified