|
Page 1 of 1
|
[ 2 posts ] |
|
Author |
Message |
Linkcat
Rookie
Joined: Tue Jan 08, 2013 6:08 pm Posts: 4
|
 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.
|
Mon Mar 11, 2013 4:05 pm |
|
 |
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 620
|
 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.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
Wed Mar 13, 2013 11:58 am |
|
|
|
Page 1 of 1
|
[ 2 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 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
|
|