NormalizeAngle.java 418B

12345678910111213141516171819202122232425
  1. public class NormalizeAngle {
  2. public Integer normalizeValueUsingModulo(Integer angle){
  3. if (angle <= 360){
  4. return angle;
  5. }
  6. return angle % 360;
  7. }
  8. public Integer normalizeValueUsingFloorMod(Integer integer){
  9. if (integer <= 360){
  10. return integer;
  11. }
  12. return Math.floorMod(integer, 360);
  13. }
  14. public static void main(String[] args){
  15. }
  16. }