Here's the result from the robot
Code:
double result;
double x[] = {179, 180, 181, 359, 721, -1, -179, -180, -359, -361, -721};
for (int i = 0; i < x.length; i++){
result = MathUtils.IEEEremainder(x[i],360.0);
System.out.println("x: " + x[i] + " rem y: 360 result: " + result);
}
Quote:
[cRIO] x: 179.0 rem y: 360 result: 179.0
[cRIO] x: 180.0 rem y: 360 result: 180.0
[cRIO] x: 181.0 rem y: 360 result: -179.0
[cRIO] x: 359.0 rem y: 360 result: -1.0
[cRIO] x: 721.0 rem y: 360 result: 1.0
[cRIO] x: -1.0 rem y: 360 result: -1.0
[cRIO] x: -179.0 rem y: 360 result: -179.0
[cRIO] x: -180.0 rem y: 360 result: -180.0
[cRIO] x: -359.0 rem y: 360 result: 1.0
[cRIO] x: -361.0 rem y: 360 result: -1.0
[cRIO] x: -721.0 rem y: 360 result: -1.0
|