Thread: Math.atan2 ?
View Single Post
  #1   Spotlight this post!  
Unread 17-01-2010, 15:29
ionine_ ionine_ is offline
Registered User
FRC #0334
 
Join Date: Jan 2010
Location: Brooklyn, NY
Posts: 10
ionine_ is on a distinguished road
Math.atan2 ?

Hello. This year my team is planning to use Mecanum wheels, and we are programming in Java. Since we plan to use RobotDrive.holonomicDrive, we need to convert joystick (Xbox controller, and some of the axes are inverted so WPILibJ's Joystick.getMagnitude, etc. are out of the question) and our algorithm for this involves Math.atan2. However, the JRE on the cRIO doesn't seem to have such a feature. Is there any way to forgo using Math.atan2 or is there some other replacement for converting Cartesian coordinates to polar coordinates?

Thank you,
Ilya Ostrovskiy, #334.
Reply With Quote