ランダムな値を計算する

投稿日:2022-10-02 投稿者:PS カテゴリ:その他 タグ: , , ,

Math.rondom()        // 0 から 1 までの間のランダムな値
//
Math.floor( Math.random() * 100 );               // 0 ~ 100 のランダム値
Math.floor( Math.random() * (50 - 40) + 100 );   // 40 ~ 50 のランダム値