|
Re: Is my Java code ok?
Quote:
Originally Posted by MaGiC_PiKaChU
No. The math.abs function transforms your value to positive.
if (Math.abs(xboxController.getRawAxis(5) < .1) is equivalent to if(xboxController.getRawAxis(5) < .1 || xboxController.getRawAxis(5) > -.1)
|
That should be an && (and) in your compound statement instead of an or.
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
|