{"id":191,"date":"2009-02-16T10:01:38","date_gmt":"2009-02-16T17:01:38","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=793"},"modified":"2009-02-16T10:01:38","modified_gmt":"2009-02-16T17:01:38","slug":"mathmin-mathmax-rest","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=191","title":{"rendered":"Math.min() Math.max() &#8230;rest"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\ntrace(&quot;min&quot;, Math.min(100, 99, 32, 75, 44, 90));\r\ntrace(&quot;max&quot;, Math.max(100, 99, 32, 75, 44, 90));\r\n\/*outputs:\r\n32\r\n100\r\n*\/\r\n<\/pre>\n<p>It&#8217;s easy not to notice that Math.min() and Math.max() can take any number of arguments. I&#8217;ve seen people nest min\/max calls instead of using the above option&#8230;. like this:<\/p>\n<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\ntrace(Math.min(1, Math.min(2, 3)));\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>trace(&quot;min&quot;, Math.min(100, 99, 32, 75, 44, 90)); trace(&quot;max&quot;, Math.max(100, 99, 32, 75, 44, 90)); \/*outputs: 32 100 *\/ It&#8217;s easy not to notice that Math.min() and Math.max() can take any number of arguments. I&#8217;ve seen people nest min\/max calls instead of using the above option&#8230;. like this: trace(Math.min(1, Math.min(2, 3)));<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[3,4],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-misc","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=191"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}