{"id":149,"date":"2017-06-27T10:47:53","date_gmt":"2017-06-27T02:47:53","guid":{"rendered":"https:\/\/blog.lcsoul.cn\/?p=149"},"modified":"2017-06-27T10:47:53","modified_gmt":"2017-06-27T02:47:53","slug":"javascript%e5%8f%96%e6%95%b4","status":"publish","type":"post","link":"https:\/\/blog.lcsoul.top\/index.php\/2017\/06\/27\/javascript%e5%8f%96%e6%95%b4\/","title":{"rendered":"JavaScript\u53d6\u6574"},"content":{"rendered":"<h2>\u4e22\u5f03\u5c0f\u6570\u90e8\u5206,\u4fdd\u7559\u6574\u6570\u90e8\u5206<\/h2>\n<pre class=\"prettyprint linenums\">parseInt(5\/2)\n<\/pre>\n<h2>\u5411\u4e0a\u53d6\u6574,\u6709\u5c0f\u6570\u5c31\u6574\u6570\u90e8\u5206\u52a01<\/h2>\n<pre class=\"prettyprint linenums\">Math.ceil(5\/2)\n<\/pre>\n<h2>\u56db\u820d\u4e94\u5165<\/h2>\n<pre class=\"prettyprint linenums\">Math.round(5\/2)\n<\/pre>\n<h2>\u5411\u4e0b\u53d6\u6574<\/h2>\n<pre class=\"prettyprint linenums\">Math.floor(5\/2)\n<\/pre>\n<h2>Math \u5bf9\u8c61\u7684\u65b9\u6cd5<\/h2>\n<pre class=\"prettyprint linenums\">abs(x)\t\u8fd4\u56de\u6570\u7684\u7edd\u5bf9\u503c\nacos(x)\t\u8fd4\u56de\u6570\u7684\u53cd\u4f59\u5f26\u503c\nasin(x)\t\u8fd4\u56de\u6570\u7684\u53cd\u6b63\u5f26\u503c\natan(x)\t\u4ee5\u4ecb\u4e8e -PI\/2 \u4e0e PI\/2 \u5f27\u5ea6\u4e4b\u95f4\u7684\u6570\u503c\u6765\u8fd4\u56de x \u7684\u53cd\u6b63\u5207\u503c\natan2(y,x)\t\u8fd4\u56de\u4ece x \u8f74\u5230\u70b9 (x,y) \u7684\u89d2\u5ea6\uff08\u4ecb\u4e8e -PI\/2 \u4e0e PI\/2 \u5f27\u5ea6\u4e4b\u95f4\uff09\nceil(x)\t\u5bf9\u4e00\u4e2a\u6570\u8fdb\u884c\u4e0a\u820d\u5165\u3002\ncos(x)\t\u8fd4\u56de\u6570\u7684\u4f59\u5f26\nexp(x)\t\u8fd4\u56de e \u7684\u6307\u6570\u3002\nfloor(x)\t\u5bf9\u4e00\u4e2a\u6570\u8fdb\u884c\u4e0b\u820d\u5165\u3002\nlog(x)\t\u8fd4\u56de\u6570\u7684\u81ea\u7136\u5bf9\u6570\uff08\u5e95\u4e3ae\uff09\nmax(x,y)\t\u8fd4\u56de x \u548c y \u4e2d\u7684\u6700\u9ad8\u503c\nmin(x,y)\t\u8fd4\u56de x \u548c y \u4e2d\u7684\u6700\u4f4e\u503c\npow(x,y)\t\u8fd4\u56de x \u7684 y \u6b21\u5e42\nrandom()\t\u8fd4\u56de 0 ~ 1 \u4e4b\u95f4\u7684\u968f\u673a\u6570\nround(x)\t\u628a\u4e00\u4e2a\u6570\u56db\u820d\u4e94\u5165\u4e3a\u6700\u63a5\u8fd1\u7684\u6574\u6570\nsin(x)\t\u8fd4\u56de\u6570\u7684\u6b63\u5f26\nsqrt(x)\t\u8fd4\u56de\u6570\u7684\u5e73\u65b9\u6839\ntan(x)\t\u8fd4\u56de\u4e00\u4e2a\u89d2\u7684\u6b63\u5207\ntoSource()\t\u4ee3\u8868\u5bf9\u8c61\u7684\u6e90\u4ee3\u7801\nvalueOf()\t\u8fd4\u56de\u4e00\u4e2a Math \u5bf9\u8c61\u7684\u539f\u59cb\u503c\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e22\u5f03\u5c0f\u6570\u90e8\u5206,\u4fdd\u7559\u6574\u6570\u90e8\u5206 parseInt(5\/2) \u5411\u4e0a\u53d6\u6574,\u6709\u5c0f\u6570\u5c31\u6574\u6570\u90e8\u5206\u52a01 Math.ceil(5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[52,136,140,141,143],"class_list":["post-149","post","type-post","status-publish","format-standard","hentry","category-codeshare","tag-math","tag-136","tag-140","tag-141","tag-143"],"_links":{"self":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/149","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/comments?post=149"}],"version-history":[{"count":0,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}