Changed conditionals to avoid undefined behavior and improve readability
Changed conditionals to avoid undefined behavior and improve readability

WPI-ARC/arc_utilities,WPI-ARC/arc_utilities,UM-ARM-Lab/arc_utilities,UM-ARM-Lab/arc_utilities,WPI-ARC/arc_utilities,UM-ARM-Lab/arc_utilities