minor update to r1558 for coding standards, comments, etc

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1572 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-10-04 20:57:25 +00:00
parent 844f92afe5
commit 1935953796
+18 -15
View File
@@ -360,21 +360,24 @@ OpenLayers.Bounds.prototype = {
}, },
/** /**
* @return Simple String representation of OpenLayers.Bounds object. * @param {int} decimal How many significant digits in the bbox coords?
* (ex. <i>"5,42,10,45"</i>) * Default is 6
* @type String *
*/ * @returns Simple String representation of OpenLayers.Bounds object.
toBBOX:function(power) { * (ex. <i>"5,42,10,45"</i>)
var mult; * @type String
if (power != null) { */
mult = Math.pow(10,power); toBBOX:function(decimal) {
} else { if (decimal== null) {
mult = Math.pow(10,6); decimal = 6;
} }
return (Math.round(this.left*mult)/mult + "," + var mult = Math.pow(10, decimal);
Math.round(this.bottom*mult)/mult + "," + var bbox = Math.round(this.left*mult)/mult + "," +
Math.round(this.right*mult)/mult + "," + Math.round(this.bottom*mult)/mult + "," +
Math.round(this.top*mult)/mult); Math.round(this.right*mult)/mult + "," +
Math.round(this.top*mult)/mult;
return bbox;
}, },
/** /**