Rounding in PIC
Page 1 of 1

Author:  Linkcat [ Mon Mar 11, 2013 4:05 pm ]
Post subject:  Rounding in PIC

Hello, I would like to know if there is a way to round numbers using a PIC microcontroller. In Robotc when I am on the Cortex 2.0 platform type, there is a rounding function. When I switch to the P
IC 0.5 platform type, the function dissappears. I need to be able to round a number to the nearest integer.

Thank you in advance.

Author:  tfriez [ Wed Mar 13, 2013 11:58 am ]
Post subject:  Re: Rounding in PIC

Because of memory limitations of the PIC, the ROBOTC VM on the PIC does not support Long and Float variables. The VEX Cortex does support Long and Float variable types.

With only Integer and smaller variable types available, the necessity for the "round" function doesn't exist on the PIC as there's nothing to round.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group