|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Floating Points and rounding
Hey guys,
for the camera this year, i'd like to set the PAN and TILT values into degrees. Now im sure there is code already formulated somewhere within kevin code. but i'd rather wrap my mind around how to properly do it . This is my code so far. //(1.42 degree) per (1pwm) PAN_DEGREE = (180 / 127); True_PAN_Degree = PAN_DEGREE * PAN_SERVO; Now. my question to u guys. i want to use floating points instead of intergers. i would also like to noe how to round the floating point number to 4 decimals. However. i do know that floating points do take alot of space and processing power! but! the maximum value being produced is 180. ( 180 degrees). If you could leave some input that would be great ![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Rounding numbers | teh_pwnerer795 | Programming | 13 | 17-12-2006 12:16 |
| pic: Team 228 and the floating tetra | artdutra04 | Extra Discussion | 8 | 02-05-2005 19:58 |
| pic: YMTC: 150 points or 100 points? | CD47-Bot | Extra Discussion | 4 | 25-03-2004 01:53 |
| 5 points I make..(and a little excess) | archiver | 1999 | 7 | 23-06-2002 22:18 |
| Awards and points... | Ian W. | Rules/Strategy | 4 | 24-03-2002 13:30 |