couldn't help making this small code reduction. no functional change. all tests pass.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5084 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-11-01 08:31:27 +00:00
parent e14f0c20b8
commit 7ab5d456a8
+2 -4
View File
@@ -187,11 +187,9 @@ OpenLayers.Number = {
* digits. * digits.
*/ */
limitSigDigs: function(num, sig) { limitSigDigs: function(num, sig) {
var fig; var fig = 0;
if(sig > 0) { if (sig > 0) {
fig = parseFloat(num.toPrecision(sig)); fig = parseFloat(num.toPrecision(sig));
} else {
fig = 0;
} }
return fig; return fig;
} }