{"id":672,"date":"2014-12-05T06:35:25","date_gmt":"2014-12-05T06:35:25","guid":{"rendered":"http:\/\/blog.moramcnt.com\/?p=672"},"modified":"2015-01-04T05:07:11","modified_gmt":"2015-01-04T05:07:11","slug":"%ec%95%84%eb%91%90%ec%9d%b4%eb%85%b8-float%ec%9d%84-%eb%ac%b8%ec%9e%90%ec%97%b4%eb%a1%9c-%eb%b3%80%ed%99%98","status":"publish","type":"post","link":"http:\/\/blog.moramcnt.com\/?p=672","title":{"rendered":"\uc544\ub450\uc774\ub178 float\uc744 \ubb38\uc790\uc5f4\ub85c \ubcc0\ud658"},"content":{"rendered":"<p>\uc544\ub450\uc774\ub178\uc5d0\uc11c \uc544\ub798\ucc98\ub7fc sprintf\uc744 \uc774\uc6a9\ud558\uc5ec \ubb38\uc790\uc5f4\ub85c \ubcc0\uacbd\ud558\ub824\uace0 \ud560\ub54c<br \/>\n\uacb0\uacfc\ub97c \ubcf4\uba74 ? \uac00 \ucd9c\ub825\ub41c\ub2e4.<\/p>\n<pre>\r\nsprintf(pChrBuffer, \"%f\", fltValue);\r\n<\/pre>\n<p>\uc544\ub450\uc774\ub178\uc5d0\uc11c\ub294 float\ud615\uc5d0 \ub300\ud574\uc11c sprintf\uac00 \uc81c\ub300\ub85c \uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294\ub4ef\ud558\uc5ec,<br \/>\n\ud655\uc778\ud558\uc5ec \ubcf4\ub2c8 \uc544\ub798 \ud568\uc218\ub97c \uc774\uc6a9\ud558\uba74 \ubcc0\ud658\ud560\uc218 \uc788\ub2e4.<\/p>\n<pre>\r\nchar * dtostrf(ouble __val, signed char __width, unsigned char __prec, char * __s);\r\n<\/pre>\n<pre>\r\nfloat fltValue = 123.456;\r\nchar pChrBuffer[50];\r\n \r\ndtostrf(fltValue , 5, 2, pChrBuffer);  \/\/ 5 : width, 2 : precision\r\n<\/pre>\n<p>\ub2e4\ub978 \ubc29\ubc95\uc73c\ub85c\ub294 String\uc744 \uc774\uc6a9\ud558\uc5ec \uc544\ub798\uc640 \uac19\uc774 \ud560\uc218\ub3c4 \uc788\ub2e4.<\/p>\n<pre>\r\nString strValue = String(fltValue);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc544\ub450\uc774\ub178\uc5d0\uc11c \uc544\ub798\ucc98\ub7fc sprintf\uc744 \uc774\uc6a9\ud558\uc5ec \ubb38\uc790\uc5f4\ub85c \ubcc0\uacbd\ud558\ub824\uace0 \ud560\ub54c \uacb0\uacfc\ub97c \ubcf4\uba74 ? \uac00 \ucd9c\ub825\ub41c\ub2e4. sprintf(pChrBuffer, &#8220;%f&#8221;, fltValue); \uc544\ub450\uc774\ub178\uc5d0\uc11c\ub294 float\ud615\uc5d0 \ub300\ud574\uc11c sprintf\uac00 \uc81c\ub300\ub85c \uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294\ub4ef\ud558\uc5ec, \ud655\uc778\ud558\uc5ec \ubcf4\ub2c8 \uc544\ub798 \ud568\uc218\ub97c \uc774\uc6a9\ud558\uba74 \ubcc0\ud658\ud560\uc218 \uc788\ub2e4. char * dtostrf(ouble __val, signed char __width, unsigned char __prec, char * __s); float fltValue = 123.456; char pChrBuffer[50]; dtostrf(fltValue , 5, 2, pChrBuffer); \/\/ 5 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[2,35],"tags":[39,90,79,78,91,41],"class_list":["post-672","post","type-post","status-publish","format-standard","hentry","category-2","category-iot","tag-arduino","tag-float","tag-moramcnt","tag-78","tag-91","tag-41"],"_links":{"self":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=672"}],"version-history":[{"count":2,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions"}],"predecessor-version":[{"id":674,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/672\/revisions\/674"}],"wp:attachment":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=672"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}