Java Doc for MathSupport.java in  » 6.0-JDK-Modules » j2me » com » sun » perseus » platform » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.perseus.platform 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.perseus.platform.MathSupport

MathSupport
final public class MathSupport (Code)
This class is used to provide URL resolution.
version:
   $Id: MathSupport.java,v 1.5 2006/04/21 06:34:50 st125089 Exp $


Field Summary
final public static  floatPI
     The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.


Method Summary
public static  intabs(int a)
     Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
public static  floatabs(float a)
     Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
public static  floatatan(float a)
     Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
public static  floatatan2(float y, float x)
     Converts rectangular coordinates (xy) to polar (r, theta). This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi.
public static  floatcos(float a)
     Returns the trigonometric cosine of an angle.
public static  intround(float a)
     Returns the closest int to the argument.
public static  floatsin(float a)
     Returns the trigonometric sine of an angle.
public static  floatsqrt(float a)
     Returns the correctly rounded positive square root of a float value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
public static  floattan(float a)
     Returns the trigonometric tangent of an angle.
public static  floattoDegrees(float angrad)
     Converts an angle measured in radians to an approximately equivalent angle measured in degrees.
public static  floattoRadians(float angdeg)
     Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

Field Detail
PI
final public static float PI(Code)
The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.





Method Detail
abs
public static int abs(int a)(Code)
Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.

Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.
Parameters:
  a - the argument whose absolute value is to be determined the absolute value of the argument.
See Also:   java.lang.Integer.MIN_VALUE




abs
public static float abs(float a)(Code)
Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases:
  • If the argument is positive zero or negative zero, the result is positive zero.
  • If the argument is infinite, the result is positive infinity.
  • If the argument is NaN, the result is NaN.
In other words, the result is the same as the value of the expression:

Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))

Parameters:
  a - the argument whose absolute value is to be determined the absolute value of the argument.



atan
public static float atan(float a)(Code)
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2. Special cases:
  • If the argument is NaN, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.
Parameters:
  a - the value whose arc tangent is to be returned. the arc tangent of the argument.




atan2
public static float atan2(float y, float x)(Code)
Converts rectangular coordinates (xy) to polar (r, theta). This method computes the phase theta by computing an arc tangent of y/x in the range of -pi to pi. Special cases:
  • If either argument is NaN, then the result is NaN.
  • If the first argument is positive zero and the second argument is positive, or the first argument is positive and finite and the second argument is positive infinity, then the result is positive zero.
  • If the first argument is negative zero and the second argument is positive, or the first argument is negative and finite and the second argument is positive infinity, then the result is negative zero.
  • If the first argument is positive zero and the second argument is negative, or the first argument is positive and finite and the second argument is negative infinity, then the result is the float value closest to pi.
  • If the first argument is negative zero and the second argument is negative, or the first argument is negative and finite and the second argument is negative infinity, then the result is the float value closest to -pi.
  • If the first argument is positive and the second argument is positive zero or negative zero, or the first argument is positive infinity and the second argument is finite, then the result is the float value closest to pi/2.
  • If the first argument is negative and the second argument is positive zero or negative zero, or the first argument is negative infinity and the second argument is finite, then the result is the float value closest to -pi/2.
  • If both arguments are positive infinity, then the result is the float value closest to pi/4.
  • If the first argument is positive infinity and the second argument is negative infinity, then the result is the float value closest to 3*pi/4.
  • If the first argument is negative infinity and the second argument is positive infinity, then the result is the float value closest to -pi/4.
  • If both arguments are negative infinity, then the result is the float value closest to -3*pi/4.

A result must be within 2 ulps of the correctly rounded result. Results must be semi-monotonic.
Parameters:
  y - the ordinate coordinate
Parameters:
  x - the abscissa coordinate the theta component of the point(rtheta)in polar coordinates that corresponds to the point(xy) in Cartesian coordinates.




cos
public static float cos(float a)(Code)
Returns the trigonometric cosine of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.
Parameters:
  a - an angle, in radians. the cosine of the argument.




round
public static int round(float a)(Code)
Returns the closest int to the argument. The result is rounded to an integer by adding 1/2, taking the floor of the result, and casting the result to type int. In other words, the result is equal to the value of the expression:

(int)Math.floor(a + 0.5f)

Special cases:

  • If the argument is NaN, the result is 0.
  • If the argument is negative infinity or any value less than or equal to the value of Integer.MIN_VALUE, the result is equal to the value of Integer.MIN_VALUE.
  • If the argument is positive infinity or any value greater than or equal to the value of Integer.MAX_VALUE, the result is equal to the value of Integer.MAX_VALUE.

Parameters:
  a - a floating-point value to be rounded to an integer. the value of the argument rounded to the nearestint value.
See Also:   java.lang.Integer.MAX_VALUE
See Also:   java.lang.Integer.MIN_VALUE



sin
public static float sin(float a)(Code)
Returns the trigonometric sine of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.
Parameters:
  a - an angle, in radians. the sine of the argument.




sqrt
public static float sqrt(float a)(Code)
Returns the correctly rounded positive square root of a float value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is the same as the argument.
Otherwise, the result is the float value closest to the true mathematical square root of the argument value.
Parameters:
  a - a value. the positive square root of a.If the argument is NaN or less than zero, the result is NaN.



tan
public static float tan(float a)(Code)
Returns the trigonometric tangent of an angle. Special cases:
  • If the argument is NaN or an infinity, then the result is NaN.
  • If the argument is zero, then the result is a zero with the same sign as the argument.

A result must be within 1 ulp of the correctly rounded result. Results must be semi-monotonic.
Parameters:
  a - an angle, in radians. the tangent of the argument.




toDegrees
public static float toDegrees(float angrad)(Code)
Converts an angle measured in radians to an approximately equivalent angle measured in degrees. The conversion from radians to degrees is generally inexact; users should not expect cos(toRadians(90.0)) to exactly equal 0.0.
Parameters:
  angrad - an angle, in radians the measurement of the angle angradin degrees.
since:
   1.2



toRadians
public static float toRadians(float angdeg)(Code)
Converts an angle measured in degrees to an approximately equivalent angle measured in radians. The conversion from degrees to radians is generally inexact.
Parameters:
  angdeg - an angle, in degrees the measurement of the angle angdegin radians.
since:
   1.2



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.