remove extraneous diff functions. none of these was being used anyways. now all diffs return an OpenLayers.Pixel variable.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@53 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-16 18:56:49 +00:00
parent a70c7c9f86
commit b0c78422aa

View File

@@ -35,48 +35,38 @@ OpenLayers.Pixel.prototype = {
return new OpenLayers.Pixel(this.x, this.y);
},
/** returns a Size object with the difference
* between the two points
*
* @return {OpenLayers.Size}
*/
diff:function(pt) { // subtract pt from this
return new OpenLayers.Size(this.x - pt.x, this.y - pt.y);
},
/** returns a Size object with the absolute difference
* between the two points
*
* @param {OpenLayers.Pixel} pt
*
* @return {OpenLayers.Size}
*/
absDiff:function(pt) {
return new OpenLayers.Size(Math.abs(this.x - pt.x),
Math.abs(this.y - pt.y));
},
/** returns a Pixel object with the difference
* between the two points
* between the two pixels
*
* @param {OpenLayers.Pixel} pt
* @param {OpenLayers.Pixel} px
*
* @return {OpenLayers.Pixel}
*/
diffPt:function(pt) {
var sz = this.diff(pt);
return new OpenLayers.Pixel(sz.w, sz.h);
diff:function(px) {
return new OpenLayers.Pixel(this.x - px.x, this.y - px.y);
},
/** returns a Pixel object with the absolute difference
* between the two pixels
*
* @param {OpenLayers.Pixel} px
*
* @return {OpenLayers.Pixel}
*/
diffABS:function(px) {
return new OpenLayers.Pixel(Math.abs(this.x - px.x),
Math.abs(this.y - px.y));
},
/** returns whether or not the two points are equal
*
* @param {OpenLayers.Pixel} pt
* @param {OpenLayers.Pixel} px
*
* @return {bool}
*/
equal:function(pt) {
var d = this.diff(pt);
return ((d.w==0) && (d.h==0));
equal:function(px) {
var d = this.diff(px);
return ((d.x == 0) && (d.y == 0));
},
/** Return a new Pixel with this pixel's x&y augmented by