From 7ab5d456a89eec11562bd0dde1107f039c1ff614 Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 1 Nov 2007 08:31:27 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/BaseTypes.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index a9768ba578..e1e2ccc359 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -187,11 +187,9 @@ OpenLayers.Number = { * digits. */ limitSigDigs: function(num, sig) { - var fig; - if(sig > 0) { + var fig = 0; + if (sig > 0) { fig = parseFloat(num.toPrecision(sig)); - } else { - fig = 0; } return fig; }