u16suzuの blog

日々学んだことのメモブログです。

乱数を生成する

int r = arc4random_uniform(3); // range is 0~2

参考: http://programming-ios.com/objective_c-arc4random/