<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>no-work-no-life-4081</author_name>
  <author_url>https://blog.hatena.ne.jp/no-work-no-life-4081/</author_url>
  <blog_title>AppSeedのアプリ開発ブログ</blog_title>
  <blog_url>https://develop.hateblo.jp/</blog_url>
  <categories>
    <anon>Unity</anon>
  </categories>
  <description>仕事で加速度センサーを使ったアプリをUnityで作っているのですが、 「Input.acceleration」で取得した加速度センサーの値はx,y,zの値が0.000023とかかなり長い桁数の値になってしまいます。調べてみたら、「値の小数点第2以下を切り捨てて表示する方法」がわかったので備忘録として残しておきたいと思います。 Unityで値を小数点第2以下を切り捨てて表示する場合は、値の後ろに「.ToString(&quot;N2&quot;)」をつければOKです。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevelop.hateblo.jp%2Fentry%2Funity-value-syousudai2&quot; title=&quot;【Unity】値の小数点第2以下を切り捨てて表示する方法 - AppSeedのアプリ開発ブログ&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>https://unity3d.com/files/images/ogimg.jpg?1</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-02-04 09:59:29</published>
  <title>【Unity】値の小数点第2以下を切り捨てて表示する方法</title>
  <type>rich</type>
  <url>https://develop.hateblo.jp/entry/unity-value-syousudai2</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
