View Single Post
  #1   Spotlight this post!  
Unread 18-02-2010, 21:27
Lord_Jeremy's Avatar
Lord_Jeremy Lord_Jeremy is offline
Lord_Jeremy the Procrastinator
AKA: Jeremy Agostino
FRC #1546 (Chaos Inc.)
Team Role: Electrical
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Baldwin, New York
Posts: 45
Lord_Jeremy is an unknown quantity at this point
Send a message via ICQ to Lord_Jeremy Send a message via AIM to Lord_Jeremy Send a message via MSN to Lord_Jeremy Send a message via Yahoo to Lord_Jeremy
Trig Problem, missing arc functions?

Hey. So I'm in the midst of rewriting my autonomous routines. I'm implementing a navigation system. One of the functions I'm writing needs to find the angle of a right triangle, given the base and height. So I wrote double dAngle = Math.atan( y / x ); Netbeans highlighted this as an error... So then I deleted .atan and reinserted . and let the autocomplete come up. To my surprise, I see no atan or arctan or arcanything in the list of available methods. What the heck? Do we seriously not have inverse trig functions in our incredibly minimalist version of Java? Not having ArrayList was bad enough, but at least I could use Vectors with a million object casts everywhere. I don't even know how I can do what I'm doing without inverse trig. Google searching yields two options: Use a third party library or write my own lookup table-using methods. Have any other teams run into this issue? What are your solutions? Bah, and I was upset I had to write my own nsign...
__________________
Compiling...
Compiling...
Reply With Quote