post your comment   print   send to a friend
Rate:  88% | Views: 324
Question categories:  JavaScript

The Math object

JavaScript can be utilized to solve mathematical problems:

//calculate e5 Math.exp(5)
//calculate cos(2PI) Math.cos(2*Math.PI)

If you intend to invoke Math multiple times in your script, a good statement to remember is "with." By using "with," you can omit the "Math." prefix for any subsequent Math propertyi/methods/p> with (Math){ var x= sin(3.5) var y=tan(5) var result=max(x,y) }

Customer Feedback
Rate:  88% | Views: 324 | Please Rate:  
 
If you have other comments or ideas for future technical tips, please type them here:

Email: (optional)

Comments: (optional)

 Asp Hosting | Website Hosting    Back to serch results
Browse the Base
Knowledge Base
Web Design
  Do It Yourself
    JavaScript
Messages
 

Blogging at Aplus.Net

Don't forget to check out our blog ! Keep up to date at Aplus.Net.

Private Area
 
Ask
in Private
   
Personal
Folder
 
Related Questions
 
1. Calculating days remaining until Christmas
 
2. Detecting browser type
 
3. Determining browser type using object detection
 
4. The Internet Explorer challenge
 
5. JavaScript and Forms
 
Home Browse Search Ask in Private Personal Folder   Help
powered by web hosting 
  Logged as: Guest