{"id":4311,"date":"2013-02-23T16:44:06","date_gmt":"2013-02-23T07:44:06","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=4311"},"modified":"2013-02-23T16:44:06","modified_gmt":"2013-02-23T07:44:06","slug":"%e4%b9%b1%e6%95%b0%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e8%80%83%e3%81%88%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=4311","title":{"rendered":"\u4e71\u6570\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u308b"},"content":{"rendered":"<p>\u4e71\u6570\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u3082\u305d\u3082\u4e71\u6570\u3068\u306f\u306a\u306b\u304b\uff1f<\/p>\n<p>\u4e71\u6570\u3068\u306f\u3001<strong>\u30b5\u30a4\u30b3\u30ed\u306e\u51fa\u76ee\u306e\u3088\u3046\u306b\u898f\u5247\u6027\u304c\u306a\u304f\u4e88\u6e2c\u4e0d\u80fd\u306a\u6570\u5024\u306e\u3053\u3068\u3002<\/strong><\/p>\n<p>\u3068\u3001\u66f8\u304b\u308c\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>Javascript\u306e\u306a\u3069\u8a00\u8a9e\u3067\u306f<strong>Math.random();<\/strong>\u3067\u4e71\u6570\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Math.random();\u3067\u751f\u6210\u51fa\u6765\u308b\u6570\u5024\u306f\u3001\uff10\u301c\uff11\u4ee5\u4e0b\u306e\u6570\u5024\u3068\u306a\u308a\u307e\u3059\u3002\uff08\u8a73\u3057\u304f\u306f\uff10\u3068\uff11\u306e\u9593\u306e\u6570\u5024\u3068\u306a\u308a\u307e\u3059\u3002\uff09<\/p>\n<p>\u751f\u6210\u3057\u3066\u3044\u308b\u8a18\u4e8b\u306f\u4ee5\u4e0b\u3092\u53c2\u8003\u306b\u5b9c\u3057\u304f\u304a\u9858\u3044\u81f4\u3057\u307e\u3059\u3002<\/p>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=3356\">JavaScript \u30e9\u30f3\u30c0\u30e0\u95a2\u6570 Math.random() \u307e\u3068\u3081 + css3<\/a><\/h3>\n<p>\uff10\u301c\uff11\u4ee5\u4e0b\u306e\u6570\u5024\u3092\u751f\u6210\u3068\u3042\u308a\u307e\u3059\u304c\u3001\u52ff\u8ad6\u7bc4\u56f2\u306e\u6307\u5b9a\u306a\u3069\u3092\u884c\u3048\u3070\u3001\u7bc4\u56f2\u5185\u306e\u4e71\u6570\u5024\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\uff11\uff11\u301c\uff12\uff10\u306e\u5024\u3092\u751f\u6210\u3059\u308b\u5834\u5408\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n  var nMax = 20;\r\n  var nMin = 11; \r\n  var ransu = Math.floor(Math.random()*(nMax-nMin+1))+nMin;\r\n<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">13<\/pre>\n<p>\u307e\u305f\u3001\u5c11\u6570\u70b9\u3092\u53d6\u5f97\u3059\u308b\u969b\u306f\u3001\u6841\u6570\u639b\u3051\u305f\u6570\u5024\u3092\u8a2d\u5b9a\u5024\u3068\u3057\u3001\u4e71\u6570\u3092\u751f\u6210\u3057\u305f\u5f8c\u3001\u6841\u6570\u5272\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u5c11\u6570\u70b9\u306e\u4e71\u6570\u6570\u5024\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n  var nMax = 125; \r\n  var nMin = 95; \r\n  var ransu = Math.floor(Math.random()*(nMax-nMin+1))+nMin;\r\n  ransu = ransu\/100;\r\n<\/pre>\n<p><strong>\u7d50\u679c<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">1.21<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u8a00\u8a9e\u3092\u7528\u3044\u3066\u751f\u6210\u3057\u305f\u4e71\u6570\u306b\u95a2\u3057\u3066\u306f\u8a08\u7b97\u306b\u3088\u3063\u3066\u4e71\u6570\u304c\u751f\u6210\u3055\u308c\u308b\u305f\u3081\u3001\u5b8c\u5168\u306a\u4e71\u6570\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u305b\u3093\u3002\u3053\u306e\u3088\u3046\u306a\u624b\u6cd5\u3067\u751f\u6210\u3055\u308c\u305f\u4e71\u6570\u306e\u3053\u3068\u3092\u64ec\u4f3c\u4e71\u6570\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u64ec\u4f3c\u4e71\u6570\u306f\u78ba\u5b9a\u7684\u306a\u8a08\u7b97\u306b\u3088\u3063\u3066\u6c42\u3081\u3089\u308c\u3066\u3044\u308b\u6570\u5217\u306e\u70ba\u3001\u8a08\u7b97\u65b9\u6cd5\u3068\u521d\u671f\u5024\u304c\u308f\u304b\u308c\u3070\u5168\u304f\u540c\u3058\u6570\u5024\u5217\u3092\u518d\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>\u00a0\u4e71\u6570\u30c6\u30fc\u30d6\u30eb<\/h4>\n<p>\u305d\u308c\u3067\u306f\u78ba\u7387\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u64ec\u4f3c\u4e71\u6570\u3092\u4f7f\u3044\u30011\u301c160\u306e\u5024\u306e\u4e71\u6570\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u3046\u3061\u30011\u3092\u5f53\u305f\u308a\u3068\u30571\/160\u306e\u78ba\u7387\u3067\u5f53\u305f\u308b\u3068\u3044\u3046\u8a08\u7b97\u5f0f\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u691c\u8a3c\u30928000\u56de\u884c\u3063\u305f\u6642\u3001\u679c\u305f\u3057\u30661\/160\u306e\u78ba\u7387\u3067\u5f53\u305f\u308b\u306e\u304b\u3069\u3046\u304b\u3002<\/p>\n<p>\u30d4\u30f3\u3068\u304d\u305f\u65b9\u3001\u305d\u3046\u3067\u3059\u3002\u30b9\u30ed\u30c3\u30c8\u306a\u306e\u3067\u306e\u78ba\u7387\u3060\u3063\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>1\/160\u306e\u78ba\u7387\u306e\u53f0\u3092\u4e00\u65e58000\u56de\u56de\u3059\u306e\u3092\u60f3\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>script\u306f\u4ee5\u4e0b\u306e\u69d8\u306a\u611f\u3058\u3067\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nvar ransu;\r\nvar nMax = 160; \r\nvar nMin = 1;\r\nvar nTest = 8000;\r\nvar count = 0;\r\n\r\nfor(var i =0;i &lt; nTest;i++){\r\n  ransu = Math.floor(Math.random()*(nMax-nMin+1))+nMin;\r\n  if(ransu == 1){\r\n   count ++;   \r\n   console.log(&quot;\u5f53\u305f\u308a&quot;);\r\n  }\r\n}\r\nconsole.log(Math.floor(nTest\/count));\r\n<\/pre>\n<p>\u691c\u8a3c\u306e\u7d50\u679c\u4ee5\u4e0b\u306e\u69d8\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/atari.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/atari.jpg\" alt=\"\" title=\"atari\" width=\"434\" height=\"135\" class=\"alignnone size-full wp-image-4319\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/atari.jpg 434w, https:\/\/www.webcyou.com\/wp-content\/uploads\/atari-300x93.jpg 300w\" sizes=\"auto, (max-width: 434px) 100vw, 434px\" \/><\/a><\/p>\n<p>\u975e\u5e38\u306b\u30d0\u30e9\u3064\u304d\u304c\u767a\u751f\u81f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>1\/150\u306e\u78ba\u7387\u30841\/130\u306e\u78ba\u7387\u3067\u591a\u304f\u5f53\u305f\u308b\u5206\u306b\u95a2\u3057\u3066\u306f\u300c\u30e9\u30c3\u30ad\u30fc\uff01\u300d\u3068\u306a\u308a\u307e\u3059\u304c\u30011\/200\u306e\u78ba\u7387\u306b\u306a\u308b\u3068\u3001\u300c\u30af\u30c3\u30bd\u30fc\u300d\u3068\u306a\u308a\u307e\u3059\u306d\u3002w<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u30d0\u30e9\u3064\u304d\u304c\u306a\u304f160\u56de\u76ee\u306b\u306f\u5927\u4f531\u56de\u306f\u5f53\u305f\u3063\u3066\u6b32\u3057\u3044\u306e\u304c\u4eba\u60c5\u3060\u3063\u305f\u308a\u3082\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u3053\u306e\u3088\u3046\u306a\u5927\u304d\u306a\u30d0\u30e9\u3064\u304d\u304c\u751f\u3058\u308b\u3068\u30b2\u30fc\u30e0\u30d0\u30e9\u30f3\u30b9\u3092\u5d29\u308c\u3066\u3057\u307e\u3046\u304a\u305d\u308c\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u69d8\u306a\u3053\u3068\u3092\u56de\u907f\u3059\u308b\u70ba\u3001\u30b2\u30fc\u30e0\u306a\u3069\u3067\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304c\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\uff08\u4e71\u6570\u8868\uff09\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001\u30e9\u30f3\u30c0\u30e0\u306b\u6570\u5b57\u3092\u4e26\u3079\u305f\u8868\u3092\u30a4\u30e1\u30fc\u30b8\u3057\u3066\u9802\u3051\u308c\u3070\u3068\u3002<\/p>\n<p><strong>\u4e71\u6570\u8868<\/strong><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/8c8b98db65c14570cc62f9f9cba21499.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/8c8b98db65c14570cc62f9f9cba21499.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-23 7.50.44\" width=\"486\" height=\"208\" class=\"alignnone size-full wp-image-4322\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/8c8b98db65c14570cc62f9f9cba21499.png 486w, https:\/\/www.webcyou.com\/wp-content\/uploads\/8c8b98db65c14570cc62f9f9cba21499-300x128.png 300w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/a><\/p>\n<p>\u91cd\u8907\u3057\u306a\u3044\u6570\u5b57\u3092\u57cb\u3081\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u4efb\u610f\u306e\u78ba\u7387\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h4>\u30a8\u30af\u30bb\u30eb\u3067\u306e\u4f5c\u6210\u65b9\u6cd5<\/h4>\n<p>\uff32\uff21\uff2e\uff24\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u30e9\u30f3\u30c0\u30e0\u306e\u5024\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">=RAND()<\/pre>\n<p>\u30bb\u30ebA1\u301cA5\u307e\u3067\u3053\u306e\uff32\uff21\uff2e\uff24\u95a2\u6570\u3067\u30e9\u30f3\u30c0\u30e0\u306e\u5024\u3092\u751f\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/89b7230b0f44f1a7887d98f8332228c0.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/89b7230b0f44f1a7887d98f8332228c0.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-23 7.53.45\" width=\"105\" height=\"108\" class=\"alignnone size-full wp-image-4323\" \/><\/a><\/p>\n<p>\u305d\u306e\u6570\u5024\u306e\u9806\u4f4d\u3092\u3064\u3051\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u91cd\u8907\u306e\u306a\u3044\u6570\u5024\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<p>\u9806\u4f4d\u3092\u3064\u3051\u308b\u70ba\u306b\uff32\uff21\uff2e\uff2b\u95a2\u6570\u3092\u4f7f\u7528\u3057\u3001B\u306e\u30bb\u30eb\u306b\u305d\u306e\u9806\u4f4d\u3092\u8868\u793a\u3055\u305b\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">=RANK(A1,$A$1:$A$5,)<\/pre>\n<p>B1\u306e\u30bb\u30eb\u306b\u5165\u529b\u3057B2\u301c\u306f\u30b3\u30d4\u30fc\u3067A2\u301cA5\u306e\u5024\u3092\u53c2\u7167\u51fa\u6765\u308b\u3088\u3046\u306b\u3059\u308b\u3068\u9806\u4f4d\u304c\u8868\u793a\u3057\u3001\u91cd\u8907\u306e\u306a\u3044\u6570\u5024\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c47f1607f9175f093afb654265a4c213.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/c47f1607f9175f093afb654265a4c213.png\" alt=\"\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-23 8.17.59\" width=\"182\" height=\"104\" class=\"alignnone size-full wp-image-4326\" \/><\/a><\/p>\n<h4>\u30dd\u30a4\u30f3\u30bf\u30fc<\/h4>\n<p>\u518d\u3073\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u306e\u8a71\u306b\u3002<\/p>\n<p>\u5148\u307b\u3069\u7528\u610f\u3057\u305f\u3001\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u3092\u307f\u308b\u3068\u3001\u30d0\u30e9\u30d0\u30e9\u306b\u6570\u5024\u304c\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u4e2d\u3067\u62bd\u9078\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u306f\u305a\u308c\u306e\u306a\u3044\u4efb\u610f\u306e\u78ba\u7387\u3092\u3064\u304f\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u30cf\u30ba\u30ec\u306e\u7121\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u4f8b\u3048\u3070\u30013-1\u306e193\u306e\u5024\u3092\u5f15\u3044\u305f\u3068\u3059\u308b\u3068\u3001\u6b21\u306f3-1\u4ee5\u5916\u306e\u5834\u6240\u306b\u79fb\u52d5\u3055\u305b\u308b\u3002<\/p>\n<p>\u6b21\u306b\u79fb\u52d5\u3055\u305b\u308b\u5834\u6240\u304c3-4\u306e212\u306e\u5024\u3060\u3068\u3059\u308b\u3068\u30013-1\u30683-4\u4ee5\u5916\u306e\u5834\u6240\u306b\u79fb\u52d5\u3055\u305b\u308b\u3002\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u3059\u308c\u3070\u5f53\u305f\u308a\u3068\u3057\u3066\u3044\u308b\u6570\u5024\u3092\u3044\u305a\u308c\u5f15\u304f\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u73fe\u5728\u306e\u5024\u306e\u4f4d\u7f6e\u306e\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u305a\u3089\u3059\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u91cd\u8907\u306e\u306a\u3044\u62bd\u9078\u65b9\u6cd5\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<\/p>\n<h4>JavaScript\u3067\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210<\/h4>\n<p>\u305d\u308c\u3067\u306f\u3001JavaScript\u3067\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u826f\u8cea\u306a\u8a18\u4e8b\u304c\u3054\u3056\u3044\u307e\u3057\u305f\u306e\u3067\u3053\u3061\u3089\u3092\u53c2\u8003\u306b\u3002<\/p>\n<p><strong>\u30ec\u30c8\u30edRPG\u3092\u4f5c\u308b-\u4e71\u6570\u3092\u5b9f\u88c5\u3059\u308b<\/strong><\/p>\n<p><a href=\"http:\/\/plusb.jp\/blog\/?p=600\" target=\"_blank\">http:\/\/plusb.jp\/blog\/?p=600<\/a><\/p>\n<p>\u3053\u3061\u3089\u306escript\u3092\u53c2\u8003\u306b\u3055\u305b\u3066\u9802\u304f\u3068\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Random.table = &#x5B;\r\n    7, 182, 240, 31, 85, 91, 55, 227, 174, 79, 178, 94, 153, 246, 119, 203,\r\n    96, 143, 67, 62, 167, 76, 45, 136, 199, 104, 215, 209, 194, 242, 193, 221,\r\n    170, 147, 22, 247, 38, 4, 54, 161, 70, 78, 86, 190, 108, 110, 128, 213,\r\n    181, 142, 164, 158, 231, 202, 206, 33, 255, 15, 212, 140, 230, 211, 152, 71,\r\n    244, 13, 21, 237, 196, 228, 53, 120, 186, 218, 39, 97, 171, 185, 195, 125,\r\n    133, 252, 149, 107, 48, 173, 134, 0, 141, 205, 126, 159, 229, 239, 219, 89,\r\n    235, 5, 20, 201, 36, 44, 160, 60, 68, 105, 64, 113, 100, 58, 116, 124,\r\n    132, 19, 148, 156, 150, 172, 180, 188, 3, 222, 84, 220, 197, 216, 12, 183,\r\n    37, 11, 1, 28, 35, 43, 51, 59, 151, 27, 98, 47, 176, 224, 115, 204,\r\n    2, 74, 254, 155, 163, 109, 25, 56, 117, 189, 102, 135, 63, 175, 243, 251,\r\n    131, 10, 18, 26, 34, 83, 144, 207, 122, 139, 82, 90, 73, 106, 114, 40,\r\n    88, 138, 191, 14, 6, 162, 253, 250, 65, 101, 210, 77, 226, 92, 29, 69,\r\n    30, 9, 17, 179, 95, 41, 121, 57, 46, 42, 81, 217, 93, 166, 234, 49,\r\n    129, 137, 16, 103, 245, 169, 66, 130, 112, 157, 146, 87, 225, 61, 241, 249,\r\n    238, 8, 145, 24, 32, 177, 165, 187, 198, 72, 80, 154, 214, 127, 123, 233,\r\n    118, 223, 50, 111, 52, 168, 208, 184, 99, 200, 192, 236, 75, 232, 23, 248\r\n];<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30f3\u30d0\u30fc\u306b\u4e71\u6570\u3092\u683c\u7d0d<\/p>\n<p>\u30dd\u30a4\u30f3\u30bf\u79fb\u52d5<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Random.pos = Math.floor(Random.pos + Math.random() * 255) % 256;<\/pre>\n<p>\u3055\u3089\u306b\u3001\u7bc4\u56f2\u3092\u6c7a\u3081\u3066\u5224\u5b9a\u3092\u884c\u3044\u306a\u3044\u305f\u3044\u3068\u304d\u306f\u3001Random.judge({l: 0, g: 64}\u306e\u3088\u3046\u306b\u8a18\u8ff0\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Random.judge(range) {\r\n    var v = Random.table&#x5B;Random.pos];\r\n    Random.pos = Math.floor(Random.pos + Math.random() * 255) % 256;\r\n    return range.l &lt;= v &amp;&amp; v &lt; range.g;\r\n}\r\nif(Random.judge({l: 0, g: 64})) {\r\n    \/\/\u30a2\u30a4\u30c6\u30e0\u30c9\u30ed\u30c3\u30d7\r\n}<\/pre>\n<p>\u305d\u308c\u3092\u307e\u3068\u3081\u308b\u3068\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">Random.getValue = function (range) {\r\n    var v = Random.table&#x5B;Random.pos];\r\n    Random.pos = Math.floor(Random.pos + Math.random() * 255) % 256;\r\n    if (range == null) {\r\n        return v;\r\n    }\r\n    for (var i = 0; i &lt; range.length; i++) {\r\n        if (range&#x5B;i].l &lt;= v &amp;&amp; v &lt; range&#x5B;i].g) {\r\n            return i;\r\n        }\r\n    }\r\n    return i - 1;\r\n}\r\nvar Items = &#x5B;&quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;D&quot;];\r\nvar pos = Random.getValue(&#x5B;\r\n    {l:0, g: 128},\r\n    {l:128, g: 201},\r\n    {l:201, g: 251},\r\n    {l:251, g: 256}]);\r\n\/\/Items&#x5B;pos]\u304c\u30c9\u30ed\u30c3\u30d7\u3057\u305f\u30a2\u30a4\u30c6\u30e0\u3002<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3059\u308c\u3070\u3001\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u306b\u914d\u7f6e\u3057\u305f\u6570\u5b57\u304b\u3089\u62bd\u9078\u3057\u3001\uff14\u7a2e\u985e\u3042\u308b\u30a2\u30a4\u30c6\u30e0\u3092\u7bc4\u56f2\u3092\u6c7a\u3081\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3088\u3002\u3068\u8a18\u4e8b\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3044\u3084\u3041\u3002\u7d20\u6575\u3002<\/p>\n<p>\u3067\u306f\u3001\u3053\u308c\u3092\u4f7f\u3063\u3066\u53ef\u8996\u5316\u3057\u305f\u30da\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u4e71\u6570\u30c6\u30fc\u30d6\u30eb\u304c\u3069\u306e\u3088\u3046\u306b\u52d5\u3044\u3066\u3044\u308b\u304b\u3001\u4f55\u306e\u30a2\u30a4\u30c6\u30e0\u3092GET\u51fa\u6765\u3066\u3044\u308b\u304b\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002\uff08\u6570\u5b57\u306e\u91cd\u8907\u51e6\u7406\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\uff09<\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/random\/random_table.html\" target=\"_blank\"><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/a><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/random\/random_table.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/random\/random_table.html<\/a><\/p>\n<p><a href=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6530eb4e302b301b74dd562bc60d5052.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6530eb4e302b301b74dd562bc60d5052.png\" title=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2013-02-23 16.36.53\" width=\"585\" height=\"481\" class=\"alignnone  wp-image-4327\" srcset=\"https:\/\/www.webcyou.com\/wp-content\/uploads\/6530eb4e302b301b74dd562bc60d5052.png 731w, https:\/\/www.webcyou.com\/wp-content\/uploads\/6530eb4e302b301b74dd562bc60d5052-300x246.png 300w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/random\/random_table.html\" target=\"_blank\"><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/a><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/random\/random_table.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/random\/random_table.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e71\u6570\u306b\u3064\u3044\u3066\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002\u305d\u3082\u305d\u3082\u4e71\u6570\u3068\u306f\u306a\u306b\u304b\uff1f \u4e71\u6570\u3068\u306f\u3001\u30b5\u30a4\u30b3\u30ed\u306e\u51fa\u76ee\u306e\u3088\u3046\u306b\u898f\u5247\u6027\u304c\u306a\u304f\u4e88\u6e2c\u4e0d\u80fd\u306a\u6570\u5024\u306e\u3053\u3068\u3002 \u3068\u3001\u66f8\u304b\u308c\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u591a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002 Javascript\u306e\u306a\u3069\u8a00\u8a9e\u3067\u306fMath.rando [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[47,179,46,138],"class_list":["post-4311","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-javascript-2","tag-jquery","tag-js","tag-138"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4311"}],"version-history":[{"count":11,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4311\/revisions"}],"predecessor-version":[{"id":4328,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4311\/revisions\/4328"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}