Index: trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 12131)
@@ -33,4 +33,5 @@
 import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -68,6 +69,6 @@
      * Current policy is to except just everything, no matter how strange the result would be.
      */
-    private static final double TOLERANCE1 = Math.toRadians(45.);   // within a way
-    private static final double TOLERANCE2 = Math.toRadians(45.);   // ways relative to each other
+    private static final double TOLERANCE1 = Utils.toRadians(45.);   // within a way
+    private static final double TOLERANCE2 = Utils.toRadians(45.);   // ways relative to each other
 
     /**
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 12131)
@@ -76,5 +76,5 @@
     private static final Color ORANGE_TRANSPARENT = new Color(Color.ORANGE.getRed(), Color.ORANGE.getGreen(), Color.ORANGE.getBlue(), 128);
 
-    private static final ArrowPaintHelper START_WAY_INDICATOR = new ArrowPaintHelper(Math.toRadians(90), 8);
+    private static final ArrowPaintHelper START_WAY_INDICATOR = new ArrowPaintHelper(Utils.toRadians(90), 8);
 
     static final CachingProperty<Boolean> USE_REPEATED_SHORTCUT
@@ -839,5 +839,5 @@
 
 
-        double curHdg = Math.toDegrees(getCurrentBaseNode().getEastNorth()
+        double curHdg = Utils.toDegrees(getCurrentBaseNode().getEastNorth()
                 .heading(currentMouseEastNorth));
         double baseHdg = -1;
@@ -845,5 +845,5 @@
             EastNorth en = previousNode.getEastNorth();
             if (en != null) {
-                baseHdg = Math.toDegrees(en.heading(getCurrentBaseNode().getEastNorth()));
+                baseHdg = Utils.toDegrees(en.heading(getCurrentBaseNode().getEastNorth()));
             }
         }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DrawSnapHelper.java	(revision 12131)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.gui.draw.SymbolShape;
 import org.openstreetmap.josm.gui.widgets.PopupMenuLauncher;
+import org.openstreetmap.josm.tools.Utils;
 
 class DrawSnapHelper {
@@ -377,5 +378,5 @@
         LatLon mouseLatLon = Main.map.mapView.getProjection().eastNorth2latlon(snapPoint);
         double distance = this.drawAction.getCurrentBaseNode().getCoor().greatCircleDistance(mouseLatLon);
-        double hdg = Math.toDegrees(p0.heading(snapPoint));
+        double hdg = Utils.toDegrees(p0.heading(snapPoint));
         // heading of segment from current to calculated point, not to mouse position
 
@@ -485,5 +486,5 @@
 
         double hdg = segmentPoint1.heading(segmentPoint2);
-        hdg = Math.toDegrees(hdg);
+        hdg = Utils.toDegrees(hdg);
         if (hdg < 0) {
             hdg += 360;
Index: trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/data/coor/LatLon.java	(revision 12131)
@@ -8,7 +8,7 @@
 import static java.lang.Math.sin;
 import static java.lang.Math.sqrt;
-import static java.lang.Math.toRadians;
 import static org.openstreetmap.josm.data.projection.Ellipsoid.WGS84;
 import static org.openstreetmap.josm.tools.I18n.trc;
+import static org.openstreetmap.josm.tools.Utils.toRadians;
 
 import java.awt.geom.Area;
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 12131)
@@ -286,5 +286,5 @@
     static final int FLAG_OUTERMEMBER_OF_SELECTED = 8;
 
-    private static final double PHI = Math.toRadians(20);
+    private static final double PHI = Utils.toRadians(20);
     private static final double cosPHI = Math.cos(PHI);
     private static final double sinPHI = Math.sin(PHI);
@@ -978,5 +978,5 @@
             fromAngle = Math.atan(dy / dx);
         }
-        double fromAngleDeg = Math.toDegrees(fromAngle);
+        double fromAngleDeg = Utils.toDegrees(fromAngle);
 
         double vx = distanceFromVia * Math.cos(fromAngle);
@@ -1001,9 +1001,9 @@
         if (pFrom.x >= pVia.x && pFrom.y >= pVia.y) {
             if (!leftHandTraffic) {
-                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
-                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
+                vx2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg - 90));
+                vy2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg - 90));
             } else {
-                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
-                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
+                vx2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg + 90));
+                vy2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg + 90));
             }
             iconAngle = 270+fromAngleDeg;
@@ -1011,9 +1011,9 @@
         if (pFrom.x < pVia.x && pFrom.y >= pVia.y) {
             if (!leftHandTraffic) {
-                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
-                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
+                vx2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg));
+                vy2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg));
             } else {
-                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 180));
-                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 180));
+                vx2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg + 180));
+                vy2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg + 180));
             }
             iconAngle = 90-fromAngleDeg;
@@ -1021,9 +1021,9 @@
         if (pFrom.x < pVia.x && pFrom.y < pVia.y) {
             if (!leftHandTraffic) {
-                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 90));
-                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 90));
+                vx2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg + 90));
+                vy2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg + 90));
             } else {
-                vx2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg - 90));
-                vy2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg - 90));
+                vx2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg - 90));
+                vy2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg - 90));
             }
             iconAngle = 90+fromAngleDeg;
@@ -1031,9 +1031,9 @@
         if (pFrom.x >= pVia.x && pFrom.y < pVia.y) {
             if (!leftHandTraffic) {
-                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg + 180));
-                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg + 180));
+                vx2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg + 180));
+                vy2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg + 180));
             } else {
-                vx2 = distanceFromWay * Math.sin(Math.toRadians(fromAngleDeg));
-                vy2 = distanceFromWay * Math.cos(Math.toRadians(fromAngleDeg));
+                vx2 = distanceFromWay * Math.sin(Utils.toRadians(fromAngleDeg));
+                vy2 = distanceFromWay * Math.cos(Utils.toRadians(fromAngleDeg));
             }
             iconAngle = 270-fromAngleDeg;
Index: trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/WireframeMapRenderer.java	(revision 12131)
@@ -32,4 +32,5 @@
 import org.openstreetmap.josm.gui.NavigatableComponent;
 import org.openstreetmap.josm.gui.draw.MapPath2D;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -90,5 +91,5 @@
 
     /** Helper variable for {@link #drawSegment} */
-    private static final ArrowPaintHelper ARROW_PAINT_HELPER = new ArrowPaintHelper(Math.toRadians(20), 10);
+    private static final ArrowPaintHelper ARROW_PAINT_HELPER = new ArrowPaintHelper(Utils.toRadians(20), 10);
 
     /** Helper variable for {@link #visit(Relation)} */
Index: trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/data/validation/PaintVisitor.java	(revision 12131)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.data.osm.visitor.AbstractVisitor;
 import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -144,5 +145,5 @@
         double cosT = 5 * Math.cos(t);
         double sinT = 5 * Math.sin(t);
-        int deg = (int) Math.toDegrees(t);
+        int deg = (int) Utils.toDegrees(t);
         if (selected) {
             g.setColor(getHighlightColor(color));
Index: trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java	(revision 12131)
@@ -53,4 +53,5 @@
 import org.openstreetmap.josm.gui.widgets.SelectAllOnFocusGainedDecorator;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -184,5 +185,5 @@
     protected LatLon getNorthWestLatLonOfTile(Point tile, int zoom) {
         double lon = tile.x / Math.pow(2.0, zoom) * 360.0 - 180;
-        double lat = Math.toDegrees(Math.atan(Math.sinh(Math.PI - (2.0 * Math.PI * tile.y) / Math.pow(2.0, zoom))));
+        double lat = Utils.toDegrees(Math.atan(Math.sinh(Math.PI - (2.0 * Math.PI * tile.y) / Math.pow(2.0, zoom))));
         return new LatLon(lat, lon);
     }
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 12131)
@@ -589,12 +589,12 @@
                     double rightdir = (headdir > 270) ? headdir - 270 : headdir + 90;
 
-                    double ptx = p.x + Math.cos(Math.toRadians(headdir)) * arrowlength;
-                    double pty = p.y + Math.sin(Math.toRadians(headdir)) * arrowlength;
-
-                    double ltx = p.x + Math.cos(Math.toRadians(leftdir)) * arrowwidth/2;
-                    double lty = p.y + Math.sin(Math.toRadians(leftdir)) * arrowwidth/2;
-
-                    double rtx = p.x + Math.cos(Math.toRadians(rightdir)) * arrowwidth/2;
-                    double rty = p.y + Math.sin(Math.toRadians(rightdir)) * arrowwidth/2;
+                    double ptx = p.x + Math.cos(Utils.toRadians(headdir)) * arrowlength;
+                    double pty = p.y + Math.sin(Utils.toRadians(headdir)) * arrowlength;
+
+                    double ltx = p.x + Math.cos(Utils.toRadians(leftdir)) * arrowwidth/2;
+                    double lty = p.y + Math.sin(Utils.toRadians(leftdir)) * arrowwidth/2;
+
+                    double rtx = p.x + Math.cos(Utils.toRadians(rightdir)) * arrowwidth/2;
+                    double rty = p.y + Math.sin(Utils.toRadians(rightdir)) * arrowwidth/2;
 
                     g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackAction.java	(revision 12131)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.gui.help.HelpUtil;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -86,5 +87,5 @@
         }
         double avglat = latsum / latcnt;
-        double scale = Math.cos(Math.toRadians(avglat));
+        double scale = Math.cos(Utils.toRadians(avglat));
         /*
          * Compute buffer zone extents and maximum bounding box size. Note that the maximum we
Index: trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/layer/gpx/GpxDrawHelper.java	(revision 12131)
@@ -86,5 +86,5 @@
     private int hdoprange;
 
-    private static final double PHI = Math.toRadians(15);
+    private static final double PHI = Utils.toRadians(15);
 
     //// Variables used only to check cache validity
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 12131)
@@ -620,5 +620,5 @@
          */
         public static double degree_to_radians(double degree) { // NO_UCD (unused code)
-            return Math.toRadians(degree);
+            return Utils.toRadians(degree);
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/gui/util/RotationAngle.java	(revision 12131)
@@ -153,11 +153,11 @@
             case "ne":
             case "northeast":
-                return Math.toRadians(45);
+                return Utils.toRadians(45);
             case "e":
             case "east":
-                return Math.toRadians(90);
+                return Utils.toRadians(90);
             case "se":
             case "southeast":
-                return Math.toRadians(135);
+                return Utils.toRadians(135);
             case "s":
             case "south":
@@ -165,11 +165,11 @@
             case "sw":
             case "southwest":
-                return Math.toRadians(225);
+                return Utils.toRadians(225);
             case "w":
             case "west":
-                return Math.toRadians(270);
+                return Utils.toRadians(270);
             case "nw":
             case "northwest":
-                return Math.toRadians(315);
+                return Utils.toRadians(315);
             default:
                 throw new IllegalArgumentException("Unexpected cardinal direction " + cardinal);
Index: trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 12130)
+++ trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 12131)
@@ -1317,5 +1317,5 @@
                 }
 
-                double radian = Math.toRadians(angle);
+                double radian = Utils.toRadians(angle);
 
                 new ImageIcon(img); // load completely
@@ -1346,5 +1346,5 @@
 
                 // rotate the graphics about the center point of the icon
-                g2d.rotate(Math.toRadians(originalAngle));
+                g2d.rotate(Utils.toRadians(originalAngle));
 
                 g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
