Tell us about yourself!
Great example ! I suggest getting rid of the floating point math. I tested both waysand saved 500 bytes of program space doing away with the floating point.How about scaling up by 10 to get rid of 29.1 (becomes 291). distance = ( (distance >>1) *10)/291;// (distance >>1) is division by two