Summary of how javascript operates Math objects

Source: Internet
Author: User
Tags acos asin natural logarithm

// Mathematical function -- abs returns the absolute value of a number var a;/* a = Math. abs (-12); alert (a); // 12 // mathematical function -- arccosine of acos return number a = Math. acos (numeric expression); // mathematical function -- asin returns the positive cosine of a = Math. asin (numeric expression); // mathematical function -- atan returns the arc tangent of a = Math. atan (numeric expression); // The mathematical function -- ceil returns the smallest integer greater than or equal to its numeric parameter. A = Math. ceil (-10.1); alert (a); //-10 // returns the cosine of cos. A = Math. cos (numeric expression); // mathematical function -- exp returns the power of e (the base of the natural logarithm. A = Math. exp (4); alert (a); // 54.59815003314423 // mathematical function -- the floor returns the maximum integer a = Math. floor (10.2); alert (a); // 10 // mathematical function -- log returns the natural logarithm of a = Math. log (4); alert (a); // 1.3862943611198906 // mathematical function -- max returns zero or multiple numeric expressions that are greater than limit. A = Math. max (, 3); alert (a); // 20 // mathematical function -- min returns a smaller value among zero or multiple numeric expressions. A = Math. min (0,-); alert (a); //-1 // mathematical function -- pow returns the specified power of the base expression. A = Math. pow (100); alert (a); // mathematical function -- random returns a pseudo-random number between 0 and 1. a = Math. random (); alert (a); // mathematical function -- round returns the rounded integer a = Math. round (10.52); alert (a); // 11 // mathematical function -- sin returns the sine of a number. A = Math. sin (numeric expression); // mathematical function -- sqrt returns the square root of a number = Math. sqrt (25); alert (a); // 5 // mathematical function -- tan returns the tangent of a = Math. tan (numeric expression );*/

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.