Shop OBEX P1 Docs P2 Docs Learn Events
easiest way to truncate a number — Parallax Forums

easiest way to truncate a number

I'm writing a PBasic program that compares to sensor readings, ( ultrasonic). I'd like to truncate the first number so that the when I compare the 2 sensors, there not so sensitive. Does this make sense? If the results of one is 1234 and the other is 1239, I'd like to change them both to 1230. Thanks for any help.

Comments

Sign In or Register to comment.