What is the equivalent of tan-1(theta) [inverse tangent] in Java?
Labdabeta 182 Posting Pro in Training Featured Poster
Recommended Answers
Jump to PostIf I remember correctly, atan() takes radiant value, not degree. The atan2() takes the diff of y and diff of x (y2-y1, x2-x1).
Jump to PostTaywin's right - the Math trig functions work in radians, not degrees (2*Pi radians = 360 degrees). Also I think zero angle is pure "East" (is along the x axis), not North.
All 6 Replies
JeffGrigg 170 Posting Whiz in Training
Labdabeta 182 Posting Pro in Training Featured Poster
Taywin 312 Posting Virtuoso
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Labdabeta 182 Posting Pro in Training Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.