マッピィ Techlog

日々思うこと

【Unity】Random.Range関数

public static float Range(float min, float max);

public static int Range(int min, int max);

と、浮動小数と整数のランダム値を返す関数があるのですが、

その引数(min, max)について、浮動小数はmaxを含むのに対し、整数は含まないようです。

要はmin~max-1になるわけです。

f:id:macky2016:20160527205918p:plain

コメントを見るとinclusiveとあるのですけどね。

自分が何か勘違いしているのだろうか。