NormalizeAngle.java 348B

123456789101112131415161718
  1. public class NormalizeAngle {
  2. public Integer normalizeValueUsingModulo(Integer angle){
  3. return (angle % 360) < 0 ? (360 + (angle % 360)) : (angle % 360);
  4. }
  5. public Integer normalizeValueUsingFloorMod(Integer integer){
  6. return Math.floorMod(integer, 360);
  7. }
  8. public static void main(String[] args){
  9. }
  10. }