Quote:
Originally Posted by Ether
Joe, is the MathUtils.IEEEremainder() method available in 2015 FRC Java, now that the runtime engine has changed? If so, does it produce the exact same results?
|
It's in Math, rather then the squawk MathUtils workaround, but it still works.
Code:
x: 179.0 rem y: 360 result: 179.0
x: 180.0 rem y: 360 result: 180.0
x: 181.0 rem y: 360 result: -179.0
x: 359.0 rem y: 360 result: -1.0
x: 721.0 rem y: 360 result: 1.0
x: -1.0 rem y: 360 result: -1.0
x: -179.0 rem y: 360 result: -179.0
x: -180.0 rem y: 360 result: -180.0
x: -359.0 rem y: 360 result: 1.0
x: -361.0 rem y: 360 result: -1.0
x: -721.0 rem y: 360 result: -1.0