12345678910111213141516 |
- public class NormalizeAngle {
-
- public Integer normalizeValueUsingModulo(Integer angle){
- angle = angle % 360;
- return angle >= 0 ? angle : angle + 360;
- }
-
- public Integer normalizeValueUsingFloorMod(Integer integer){
- integer = Math.floorMod(integer, 360);
- return integer >= 0 ? integer : integer + 360;
- }
-
- public static void main(String[] args){
-
- }
- }
|