{"id":651,"date":"2024-11-18T11:19:03","date_gmt":"2024-11-18T11:19:03","guid":{"rendered":"http:\/\/monkey.ploogie.co.uk\/?page_id=651"},"modified":"2024-11-18T11:19:03","modified_gmt":"2024-11-18T11:19:03","slug":"mwnci-modf-function","status":"publish","type":"page","link":"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-modf-function\/","title":{"rendered":"Mwnci modf() Function"},"content":{"rendered":"<h2>Syntax<\/h2>\n<p>modf<strong>(<em>number<\/em>, <em>number<\/em>)<\/strong><\/p>\n<h2>Description<\/h2>\n<p>The <i>modf()<\/i> function returns the fractional and integer parts of the number in a two-item array. Both parts have the same sign as the number. The both parts are returned as a float.<\/p>\n<p>If an integer is used, then the resulting integer part will be 0 and the fractional part will be float of the given integer<\/p>\n<h2>Example<\/h2>\n<pre>include(\"math\")\r\nprintln(modf(10.25))\r\nprintln(modf(-10.25))\r\nprintln(modf(10))\r\n\r\n[10, 0.25]\r\n[-10, -0.25]\r\n[0, 10]\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Syntax modf(number, number) Description The modf() function returns the fractional and integer parts of the number in a two-item array. Both parts have the same sign as the number. The both parts are returned as a float. If an integer is used, then the resulting integer part will be 0 and the fractional part will &hellip; <a href=\"https:\/\/monkey.ploogie.co.uk\/index.php\/mwnci-modf-function\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Mwnci modf() 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-651","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/651","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=651"}],"version-history":[{"count":1,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/651\/revisions"}],"predecessor-version":[{"id":652,"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/pages\/651\/revisions\/652"}],"wp:attachment":[{"href":"https:\/\/monkey.ploogie.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}