{"id":7008,"date":"2018-11-01T10:24:48","date_gmt":"2018-11-01T01:24:48","guid":{"rendered":"https:\/\/sinsei.space\/blog\/?p=7008"},"modified":"2021-05-02T13:19:43","modified_gmt":"2021-05-02T04:19:43","slug":"hsp%e3%81%a7%e5%a4%a7%e3%81%8d%e3%81%aa%e4%b9%b1%e6%95%b0%e3%82%92%e7%99%ba%e7%94%9f%e3%81%95%e3%81%9b%e3%82%8b-%e3%81%9d%e3%81%ae2%e3%80%80%e5%ae%9f%e6%95%b0%e4%b9%b1%e6%95%b0%e3%81%a7%e7%a2%ba","status":"publish","type":"post","link":"https:\/\/sinsei.space\/blog\/7008","title":{"rendered":"HSP\u3067\u5927\u304d\u306a\u4e71\u6570\u3092\u767a\u751f\u3055\u305b\u308b \u305d\u306e2\u3000\u5b9f\u6570\u4e71\u6570\u3067\u78ba\u7387\u3092\u51fa\u3059"},"content":{"rendered":"<p><font size=4><br \/>\n2018\u5e74 11\u6708 1\u65e5<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u524d\u56de HSP\u306e <span style=\"color: #0000f0;\">rnd<\/span>\u95a2\u6570\u3067\u306f 32768\u307e\u3067\u306e\u4e71\u6570\u3057\u304b\u3067\u306a\u3044\u306e\u3067\u3001\u3069\u3046\u3084\u3063\u3066\u305d\u308c\u4ee5\u4e0a\u306e\u4e71\u6570\u3092\u51fa\u3059\u304b\u3084\u308a\u307e\u3057\u305f\u3001\u305d\u306e\u7d9a\u304d\u3067\u3059\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u5b9f\u6570\uff08\u5c0f\u6570\uff09\u3067\u306e\u4e71\u6570\u767a\u751f\u3092\u8a66\u3057\u3066\u307f\u305f\u3089\u3001\u3053\u3061\u3089\u306e\u65b9\u304c\u5206\u304b\u308a\u3084\u3059\u304f\u7c21\u5358\u3060\u3063\u305f\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3046\u4e8b\u306b\u3057\u305f\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><\/p>\n<pre class=\"lang:hsp decode:true \" >\r\n#include \"hspda.as\" ; \u5b9f\u6570\u4e71\u6570\u7528\r\n\r\n\trndf_ini ; \u4e71\u6570\u306e\u521d\u671f\u5316\r\n\r\n\trandomize\r\n\r\n\tpos 10,10  : mes \"\u4e71\u6570\"\r\n\tpos 100,10 : mes \"\u6700\u7d42\u7684\u306a\u4e71\u6570\"\r\n\r\n\tr=10000000 ; \u51fa\u3057\u305f\u3044\u4e71\u6570\r\n\r\n\trepeat 20\r\n\t rndf_get f\t; 0\uff5e1\u306e\u4e71\u6570\u30010.000001\u30b1\u30bf\r\n\t  pos 10,cnt*20+40 : mes f\r\n\r\n\t n=int(double(r)*f) ; \u51fa\u3057\u305f\u3044\u4e71\u6570\u306b%\u3092\u639b\u3051\u308b\r\n\t  pos 100,cnt*20+40 : mes n\r\n\tloop\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2018\/11\/img01995.jpg\" alt=\"\" width=\"239\" height=\"483\" class=\"alignnone size-full wp-image-7034\" srcset=\"https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2018\/11\/img01995.jpg 239w, https:\/\/sinsei.space\/blog\/wp-content\/uploads\/2018\/11\/img01995-148x300.jpg 148w\" sizes=\"auto, (max-width: 239px) 85vw, 239px\" \/><\/p>\n<p><!--more--><br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000#include &#8220;hspda.as&#8221;\u3000.as\u30d5\u30a1\u30a4\u30eb\u306f\u5916\u90e8 DLL\u3068\u3044\u3046\u8a33\u3067\u306f\u7121\u3044\u306e\u3067 HSP Dish\u3067\u3082\u305f\u3076\u3093\u554f\u984c\u306a\u3044\u3002<\/p>\n<p>\u3000\u5b9f\u6570\uff08\u5c0f\u6570\u70b9\uff09\u306e\u4e71\u6570\u3068\u306f 0\uff5e1\u306e\u3001\u3064\u307e\u308a 0.000001\uff5e1.000000\u307e\u3067\u306e\u4e71\u6570\u3067\u3001100%\u304c 1.0\u3068\u306a\u308b\u3002<\/p>\n<p>\u3000\u3053\u306e\u6570\u306b\u6c42\u3081\u305f\u3044\u4e71\u6570\u306e\u6570\u3092\u639b\u3051\u308c\u3070\u3088\u3044\u3002<\/p>\n<p>\u3000\u3064\u307e\u308a\u524d\u56de\u306e\u6574\u6570\u4e71\u6570\u3060\u3068\u6700\u5927\u3067 1\/32768\u306e\u7cbe\u5ea6\u3060\u3063\u305f\u3051\u3069\u3001\u3053\u308c\u3060\u3068\u6700\u5927\u3067 1\/1000000\uff08\u767e\u4e07\uff09\u306e\u7cbe\u5ea6\u306b\u306a\u308b\uff08\u306f\u305a\u306a\u3093\u3060\u3051\u3069\u3001\u3069\u3046\u3044\u3046\u8a33\u304b\u305d\u308c\u4ee5\u4e0a\u306e\u30b1\u30bf\u3067\u3082 1\u5358\u4f4d\u3067\u4e71\u6570\u304c\u51fa\u308b\u3088\u3046\u306a\u30fb\u30fb\u30fb\uff09<\/p>\n<p>\u3000\u3064\u307e\u308a 1000000\u4ee5\u4e0b\u306e\u6570\u3067\u3042\u308c\u3070 1\u305a\u3064\u306e\u4e71\u6570\u3092\u51fa\u305b\u308b\u3068\u8a00\u3046\u8a33\u3060\u3002<br \/>\n<strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u95a2\u6570\u5316\uff08\u64ec\u4f3c\u547d\u4ee4\u5316\uff09\u3057\u3066\u307f\u308b<\/p>\n<pre class=\"lang:hsp decode:true \" >\r\n#include \"hspmath.as\" ; \u8a08\u7b97(round\u7528)\r\n#include \"hspda.as\" ; \u5b9f\u6570\u4e71\u6570\u7528\r\n\r\n\trndf_ini ; \u4e71\u6570\u306e\u521d\u671f\u5316\r\n\r\ngosub *main\r\n\r\n\r\n#defcfunc rnb int rnbn ; \u5927\u304d\u3044\u6570\u306e\u4e71\u6570\r\n\r\n\trndf_get rnbf ; 0\uff5e1\u306e\u5b9f\u6570\u4e71\u6570\u30010.000001\u30b1\u30bf\r\n\t rnbg=int(round(double(rnbn)*rnbf)) ; \u51fa\u3057\u305f\u3044\u4e71\u6570\u306b%\u3092\u639b\u3051\u308b\r\n\r\n\treturn rnbg\r\n\r\n\r\n*main\r\n\r\n\tr=2147483648-1 ; 2147483648 ; \u6700\u5927\u6570\r\n\r\n\trepeat 20\r\n\t n=rnb(r)\r\n\t  mes n\r\n\tloop\r\n<\/pre>\n<p><strong>\u3000<\/strong><br \/>\n<strong>\u3000<\/strong><br \/>\n\u3000\u3088\u3057\u3001\u3067\u306f\u30e9\u30f3\u30d6\u95a2\u6570\u3068\u540d\u3065\u3051\u3088\u3046\uff08\u9069\u5f53\uff09<\/p>\n<p>\u3000\u5197\u8ac7\u306f\u3055\u3066\u304a\u304d\u3001HSP\u3067\u6271\u3048\u308b\u6570\u306e\u6700\u5927\u304c 2147483648\u306a\u306e\u3060\u304c\u3001\u305d\u306e\u6570\u3067\u3084\u308b\u3068\u5024\u304c -\u306b\u306a\u308b\u306e\u3067\u3001-1\u306e 2147483647\u304c\u3053\u306e\u65b9\u6cd5\u3067\u6c42\u3081\u3089\u308c\u308b\u6700\u5927\u4e71\u6570\u3068\u3044\u3046\u4e8b\u306b\u305f\u3076\u3093\u306a\u308b\u3060\u308d\u3046\uff08\u78ba\u8a3c\u306f\u7121\u3044\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2018\u5e74 11\u6708 1\u65e5 \u3000 \u3000 \u3000\u524d\u56de HSP\u306e rnd\u95a2\u6570\u3067\u306f 32768\u307e\u3067\u306e\u4e71\u6570\u3057\u304b\u3067\u306a\u3044\u306e\u3067\u3001\u3069\u3046\u3084\u3063\u3066\u305d\u308c\u4ee5\u4e0a\u306e\u4e71\u6570\u3092\u51fa\u3059\u304b\u3084\u308a\u307e\u3057\u305f\u3001\u305d\u306e\u7d9a\u304d\u3067\u3059\u3002 \u3000 \u3000 \u3000\u5b9f\u6570\uff08\u5c0f\u6570\uff09\u3067\u306e\u4e71\u6570\u767a\u751f\u3092\u8a66\u3057\u3066\u307f\u305f\u3089\u3001\u3053\u3061\u3089 &hellip; <a href=\"https:\/\/sinsei.space\/blog\/7008\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;HSP\u3067\u5927\u304d\u306a\u4e71\u6570\u3092\u767a\u751f\u3055\u305b\u308b \u305d\u306e2\u3000\u5b9f\u6570\u4e71\u6570\u3067\u78ba\u7387\u3092\u51fa\u3059&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13],"tags":[],"class_list":["post-7008","post","type-post","status-publish","format-standard","hentry","category-hsp","category-13"],"_links":{"self":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/7008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/comments?post=7008"}],"version-history":[{"count":22,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/7008\/revisions"}],"predecessor-version":[{"id":7037,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/posts\/7008\/revisions\/7037"}],"wp:attachment":[{"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/media?parent=7008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/categories?post=7008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinsei.space\/blog\/wp-json\/wp\/v2\/tags?post=7008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}