Skip to content

@m2mtech m2mtech released this Apr 21, 2017 · 10 commits to master since this release

Make one of your operation buttons be “generate a random double-precision floating point number between 0 and 1”. This operation button is not a constant (since it changes each time you invoke it). Nor is it a unary operation (since it does not operate on anything). Probably the easiest way to generate a random number in iOS is the global Swift function arc4random() which generates a random number between 0 and the largest possible 32-bit integer (UInt32.max). You’ll have to get to double precision floating point number from there, of course.

https://cs193p.m2m.at/cs193p-assignment-1-extra-task-3-winter-2017/

Assets 2
You can’t perform that action at this time.