aspose file tools*
The moose likes Beginning Java and the fly likes Math Method? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Math Method?" Watch "Math Method?" New topic
Author

Math Method?

matt gilbert
Greenhorn

Joined: Jun 17, 2003
Posts: 5
Math Method?
Dose any know where I can get some info on Math Methods? What is returned if you try to pass an argument that is not a number?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Try the API:
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/Math.html


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
matt gilbert
Greenhorn

Joined: Jun 17, 2003
Posts: 5
I read the math class. Is the Math class the same as math method? do you get a NA when you try to pass a non number?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
Methods are part of a class. I suppose that it is possible that within the 2,000 or so classes of the API there might be one called "math". The API does tell you what happens when you pass NaN (not a number):
For example, the tan method says:
If the argument is NaN or an infinity, then the result is NaN.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Math Method?