{"id":7456,"date":"2021-08-05T12:55:03","date_gmt":"2021-08-05T12:55:03","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7456"},"modified":"2022-04-13T16:30:46","modified_gmt":"2022-04-13T16:30:46","slug":"how-can-i-use-math-object-properties-in-javascript","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/","title":{"rendered":"How can I use math Object Properties in JavaScript?"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png\" alt=\"\" class=\"wp-image-7460\" width=\"653\" height=\"371\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png 615w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties-300x171.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Math<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Math object holds a set of constants and methods that enable more complex mathematical operations than the basic arithmetic operators. We can not instantiate a Math Object. The Math object is static so it\u201fs properties and methods are accessed directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ex:-<br>Math.PI<br>Math.abs( )<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Properties<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>E                 Returns Euler&#8217;s number (approx. 2.718)<\/li><li>LN2            Returns the natural logarithm of 2 (approx. 0.693)<\/li><li>LN10          Returns the natural logarithm of 10 (approx. 2.302)<\/li><li>LOG2E        Returns the base-2 logarithm of E (approx. 1.442)<\/li><li>LOG10E      Returns the base-10 logarithm of E (approx. 0.434)<\/li><li>PI               Returns PI (approx. 3.14)<\/li><li>SQRT1_2    Returns the square root of 1\/2 (approx. 0.707)<\/li><li>SQRT2       Returns the square root of 2 (approx. 1.414)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Methods<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Math.abs(arg)                    Returns the absolute value of arg<\/li><li>Math.acos(arg)                  Returns the arccosine of arg, in radians<\/li><li>Math.acosh(arg)                Returns the hyperbolic arccosine of arg<\/li><li>Math.asin(arg)                   Returns the arcsine of arg, in radians<\/li><li>Math.asinh(arg)                 Returns the hyperbolic arcsine of arg<\/li><li>Math.atan(arg)                  Returns the arctangent of arg as a numeric value between -PI\/2 and PI\/2 radians<\/li><li>Math.atan2(arg1, arg2)     Returns the arctangent of the quotient of its arguments<\/li><li>Math.atanh(arg)                Returns the hyperbolic arctangent of arg<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Methods<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Math.cbrt(arg)              Returns the cubic root of arg<\/li><li>Math.ceil(arg)               Returns arg, rounded upwards to the nearest integer<\/li><li>Math.cos(arg)               Returns the cosine of arg (arg is in radians)<\/li><li>Math.cosh(arg)             Returns the hyperbolic cosine of arg<\/li><li>Math.exp(arg)               Returns the value of Ex<\/li><li>Math.floor(arg)             Returns arg, rounded downwards to the nearest integer<\/li><li>Math.log(arg)               Returns the natural logarithm (base E) of arg<\/li><li>Math.random()             Returns a random number between 0 and 1<\/li><li>Math.round(arg)           Rounds arg to the nearest integer<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Methods<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>Math.max(arg1, arg2, \u2026,arg_n)                 Returns the number with the highest value<\/li><li>Math.min(arg1, arg2, \u2026,arg_n)                  Returns the number with the lowest value<\/li><li>Math.pow(arg1, arg2)                               Returns the value of arg to the power of arg2<\/li><li>Math.sin(arg)                                            Returns the sine of arg (arg is in radians)<\/li><li>Math.sinh(arg)                                          Returns the hyperbolic sine of arg<\/li><li>Math.sqrt(arg)                                          Returns the square root of arg<\/li><li>Math.tan(arg)                                           Returns the tangent of an angle<\/li><li>Math.tanh(arg)                                         Returns the hyperbolic tangent of a number<\/li><li>Math.trunc(arg)                                        Returns the integer part of a number (arg)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Math The Math object holds a set of constants and methods that enable more complex mathematical operations than the basic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[16],"tags":[5095,5973,5173,1073],"class_list":["post-7456","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-javascript","tag-math-object","tag-methods","tag-properties"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How can I use math Object Properties in JavaScript? - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How can I use math Object Properties in JavaScript? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Math The Math object holds a set of constants and methods that enable more complex mathematical operations than the basic [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-05T12:55:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-13T16:30:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"How can I use math Object Properties in JavaScript?\",\"datePublished\":\"2021-08-05T12:55:03+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/\"},\"wordCount\":390,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/javascript-math-object-properties.png\",\"keywords\":[\"Javascript\",\"math Object\",\"methods\",\"properties\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/\",\"name\":\"How can I use math Object Properties in JavaScript? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/javascript-math-object-properties.png\",\"datePublished\":\"2021-08-05T12:55:03+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/javascript-math-object-properties.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/javascript-math-object-properties.png\",\"width\":615,\"height\":350},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/how-can-i-use-math-object-properties-in-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How can I use math Object Properties in JavaScript?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How can I use math Object Properties in JavaScript? - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"How can I use math Object Properties in JavaScript? - scmGalaxy","og_description":"Math The Math object holds a set of constants and methods that enable more complex mathematical operations than the basic [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-05T12:55:03+00:00","article_modified_time":"2022-04-13T16:30:46+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png","type":"","width":"","height":""}],"author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"How can I use math Object Properties in JavaScript?","datePublished":"2021-08-05T12:55:03+00:00","dateModified":"2022-04-13T16:30:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/"},"wordCount":390,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png","keywords":["Javascript","math Object","methods","properties"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/","name":"How can I use math Object Properties in JavaScript? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png","datePublished":"2021-08-05T12:55:03+00:00","dateModified":"2022-04-13T16:30:46+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/javascript-math-object-properties.png","width":615,"height":350},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/how-can-i-use-math-object-properties-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How can I use math Object Properties in JavaScript?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7456"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7456\/revisions"}],"predecessor-version":[{"id":7464,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7456\/revisions\/7464"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}