diff --git a/src/ol/rotationconstraint.js b/src/ol/rotationconstraint.js index 820f6cf3c8..0f6e3d2dea 100644 --- a/src/ol/rotationconstraint.js +++ b/src/ol/rotationconstraint.js @@ -1,6 +1,8 @@ goog.provide('ol.RotationConstraint'); goog.provide('ol.RotationConstraintType'); +goog.require('goog.math'); + /** * @typedef {function((number|undefined), number): (number|undefined)} @@ -50,7 +52,7 @@ ol.RotationConstraint.createSnapToN = function(n) { * @return {ol.RotationConstraintType} Rotation constraint. */ ol.RotationConstraint.createSnapToZero = function(opt_tolerance) { - var tolerance = opt_tolerance || 0.1; + var tolerance = opt_tolerance || goog.math.toRadians(5); return ( /** * @param {number|undefined} rotation Rotation.