• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The Math Object

The Math object gives you access to powerful math routines, such as log, sqrt, and pow (which raises values to various powers). We’ve already seen the Math object in the book every now and then when we had to round off numbers or find absolute values. You can see the properties (actually, they’re read-only constants, which is why they’re all in capital letters) and methods of the Math object in Table 19.1, its properties in depth in Table 19.2, and its methods in Table 19.3.

Tip

The trig methods of the Math object take or return radian values. To convert an angle in degrees to radians, multiply that angle by pi and divide by 180.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint