Updated touch_moved() with simplified syntax for determining if a value is between two limits.