{"id":666,"date":"2024-11-18T13:16:30","date_gmt":"2024-11-18T13:16:30","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=666"},"modified":"2024-11-18T13:16:45","modified_gmt":"2024-11-18T13:16:45","slug":"mwnci-round-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-round-function\/","title":{"rendered":"Mwnci round() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>round<strong>(<em>number<\/em>,<em>number<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>round()<\/i> function returns a floating point number that is a rounded version of the specified number, with the specified number of decimals.<\/p>\n<p>The default number of decimals is 0, meaning that the function will return the nearest integer.<\/p>\n<h2>Example<\/h2>\n<pre>include(\"math\")\r\nx = round(5.76543, 2)\r\nprintln(x)\r\nx = round(5.76543)\r\nprintln(x)\r\nx = round(5.26543)\r\nprintln(x)\r\n\r\n\r\n5.77\r\n6\r\n5\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax round(number,number) Description The round() function returns a floating point number that is a rounded version of the specified number, with the specified number of decimals. The default number of decimals is 0, meaning that the function will return the nearest integer. Example include(&#8220;math&#8221;) x = round(5.76543, 2) println(x) x = round(5.76543) println(x) x = &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-round-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci round() Function&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-666","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=666"}],"version-history":[{"count":2,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/666\/revisions"}],"predecessor-version":[{"id":668,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/666\/revisions\/668"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}