Math.constant Math.function()
compute an absolute value
compute an arc cosine
compute an arc sine
compute an arc tangent
compute the angle from the X axis to a point
round a number up
compute a cosine
compute an exponent of e
round a number down
compute a natural logarithm
return the larger of two numbers
return the smaller of two numbers
compute xy
compute a random number; not available on all platforms
round to the nearest integer
compute a sine
compute a square root
compute a tangent
Math is a read-only reference to a placeholder object that contains mathematical functions and constants. These functions and constants are conveniently grouped by this Math object, and are invoked with syntax like this:
y =index.html Math.sin(x); area = radius * radius * Math.PI;
Math is actually a "global" property of the Window object, and as such, is usually referred to as Math, rather than as window.Math.
Math is not a class of objects like Date and String are. The Date class, for example, defines methods that operate on Date objects; on instances of the class. Math, on the other hand is simply an object that contains references to functions. These functions happen to be invoked through the Math object, but they do not operate on that object, as methods would.
file: /Techref/language/java/script/definitive/refp_219.htm, 8KB, , updated: 2019/10/14 15:00, local time: 2024/11/29 23:16,
3.149.29.98:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/Techref/language/java/script/definitive/refp_219.htm"> [Chapter 21] Reference: Math</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.