Quote:
Originally Posted by biojae
What are you using the atan() function for?
If you are going to have negative numbers for the input, it may be better to use atan2(x,y).
|
I am using it to calcluate the desired angle of a wheel in a swerve configuration. I calculate the x and y components of the vector representing each wheel. Getting the magnitude (speed) is easy, but without atan, the angle was going to be a challenge.