|
Page 1 of 1
|
[ 5 posts ] |
|
| Author |
Message |
|
recondelta090
Rookie
Joined: Fri Jan 13, 2012 5:17 pm Posts: 9
|
 Modified Atan2 Errors
I am working on using the position of the joystick to calculate an angle between 0 to 360 or -180 to 180 and the built in atan2 function doesn't do that. I have a modified Atan2 code that displayed a value between 0 to 360 before RobotC 3.50 but now I get the following errors.
|
| Wed Oct 10, 2012 10:44 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: Modified Atan2 Errors
You could also just use the atan2 function in ROBOTC  - Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Thu Oct 11, 2012 3:47 am |
|
 |
|
fxlj007
Rookie
Joined: Sun Jun 17, 2012 11:18 am Posts: 26
|
 Re: Modified Atan2 Errors
What's the difference between atan() and atan2()? Seems atan2() is a newly-added function, as it doesn't appear in the Help document?
|
| Fri Oct 12, 2012 3:17 pm |
|
 |
|
Spiked3
Expert
Joined: Tue Feb 28, 2012 3:10 pm Posts: 195
|
 Re: Modified Atan2 Errors
Welcome to the internet. Google is your friend; http://en.wikipedia.org/wiki/Atan2
_________________Mike aka Spiked3 http://www.spiked3.com
|
| Fri Oct 12, 2012 4:56 pm |
|
 |
|
mightor
Moderator
Joined: Wed Mar 05, 2008 8:14 am Posts: 2858 Location: Rotterdam, The Netherlands
|
 Re: Modified Atan2 Errors
atan2 is twice as healthy as a regular atan but has fewer calories while still maintaining the same fresh flavour.
Regards, Xander
_________________| Some people, when confronted with a problem, think, "I know, I'll use threads," | and then two they hav erpoblesms. (@nedbat)| My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
| Sat Oct 13, 2012 3:09 am |
|
|
|
Page 1 of 1
|
[ 5 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|