<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>toburau</author_name>
  <author_url>https://blog.hatena.ne.jp/toburau/</author_url>
  <blog_title>ゲームが作れるようになるまでがんばる日記</blog_title>
  <blog_url>https://toburau.hatenablog.jp/</blog_url>
  <categories>
    <anon>JavaScript</anon>
    <anon>TIPS</anon>
  </categories>
  <description>昨日のint版のランダム値生成では、指定した最大値が出ないという間違いがあった。Math.floor()ではなく、四捨五入のMath.round()を使うことで修正。 // ランダム値生成 var randfloat = function(min, max) { return Math.random() * (max-min) + min; }; var randint = function(min, max) { return Math.round( Math.random() * (max-min) + min ); }; もっと良い方法を追記 id:toburau:20121122</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20121118%2F1353204390&quot; title=&quot;ランダム値生成 修正 - ゲームが作れるようになるまでがんばる日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-11-18 11:06:30</published>
  <title>ランダム値生成 修正</title>
  <type>rich</type>
  <url>https://toburau.hatenablog.jp/entry/20121118/1353204390</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
