The Artima Developer Community
Sponsored Link

Java Answers Forum
how to calculate arctan( ) of a function

2 replies on 1 page. Most recent reply: Nov 27, 2003 2:26 PM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
jayakumar perumal

Posts: 16
Nickname: jai
Registered: Feb, 2002

how to calculate arctan( ) of a function Posted: Nov 26, 2003 11:18 PM
Reply to this message Reply
Advertisement
is there any method to calculate arctan() of expression in java...
Thanks
Jai


Clay Dagler

Posts: 21
Nickname: cdagler
Registered: Jul, 2003

Re: how to calculate arctan( ) of a function Posted: Nov 27, 2003 10:15 AM
Reply to this message Reply
It is a method in the Math class, see:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Math.html

Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: how to calculate arctan( ) of a function Posted: Nov 27, 2003 2:26 PM
Reply to this message Reply
static double atan(double a) returns the arc tangent of an angle, in the range of -pi/2 through pi/2.



double theta = Math.PI/4; //radians
double angle = 45; //degrees
double arctan = Math.atan(theta);

or

double arctan = Math.atan(Math.toRadians(angle));

Flat View: This topic has 2 replies on 1 page
Topic: Pseudocode help Previous Topic   Next Topic Topic: Internal Server Error

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use