takaki`s wheel.h file
Revision 1:794a087f6216, committed 2019-03-05
- Comitter:
- THtakahiro702286
- Date:
- Tue Mar 05 12:59:56 2019 +0000
- Parent:
- 0:dfeb240dbbc1
- Commit message:
- omuni wheel program; oliginal;
Changed in this revision
wheel.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r dfeb240dbbc1 -r 794a087f6216 wheel.h --- a/wheel.h Thu Feb 28 05:28:24 2019 +0000 +++ b/wheel.h Tue Mar 05 12:59:56 2019 +0000 @@ -1,12 +1,7 @@ double omuni_speed(double x,double y,double direction) { - double atanval,power,sinval; + double atanval,sinval; atanval = atan2(y,x); - if(abs(x) >= abs(y)) { - power = abs(x); - } else if (abs(x) < abs(y)) { - power = abs(y); - } - sinval = sin((atanval - direction) * power); + sinval = sin(atanval - direction); return sinval; } \ No newline at end of file