|
Re: printing FLOAT data type on the terminal window
Just a quick interjection if you use Floats or Doubles dont forget to format your output with %.Xf. The X is what place you want to format after the decimal. like %.2f outputs to the thousands place || x.00. If the decimal is not a double watch out for grabage data allways do some form of formating on the %F output because on a system there is a max and min a float can be, after that the system literaly gives you garbage and if your working on something that has to be exact then dont forget, in also to that comment if you want things exact then use intergers computers like base 2 and 1 && 0 so if you want to drive the robot 2.3 try to rework your measures 1 place value and move the values down a place value. have a great day!
|