### Question:
Math2 { public static float loop(float value, float interval) { if (value < 0) { value = loop(-value, interval); return value == 0 ? 0 : interval - value; } else { int i = (int) (value / interval); return i == 0 ? value : value - i * interval; } }  static int ceilPowerOfTwo(int value); static int getUsingBits(int value); static int ceil(int value, int interval); static int ceilDiv(int x, int y); static long ceilDiv(long x, int y); static long ceilDiv(long x, long y); static float loop(float value, float interval); static float clamp(float val, float min, float max); static int clamp(int val, int min, int max); static long clamp(long val, long min, long max); static double clamp(double val, double min, double max); static float second(float arg0, float arg1, float arg2); static double second(double arg0, double arg1, double arg2); static int alternativeSignNaturalNumber(int i);  }### Answer:
@Test public void testLoop() { assertEquals(0, loop(0, 360)); assertEquals(90, loop(90, 360)); assertEquals(0, loop(360, 360)); assertEquals(90, loop(360 + 90, 360)); assertEquals(270, loop(-90, 360)); assertEquals(90, loop(-270, 360)); assertEquals(0, loop(-360, 360)); assertEquals(270, loop(-360 - 90, 360)); }