<commit_before>/*
* Convert degrees to radians
*/
OpenLayers.Util=new Object();

OpenLayers.Pixel = Class.create();
OpenLayers.Pixel.prototype = {
    initialize: function(x,y) {
        this.x=x;
        this.y=y;
    },
    toString:function(){
        return ("x="+this.x+",y="+this.y);
    },
    copyOf:function() {
        return new OpenLayers.Pixel(this.x, this.y); 
    },
    diff:function(pt){          // subtract pt from this
        return new OpenLayers.Size(this.x - pt.x, this.y - pt.y);
    },
    absDiff:function(pt){          // subtract pt from this
        return new OpenLayers.Size(Math.abs(this.x - pt.x), Math.abs(this.y - pt.y));
    },
    diffPt:function(pt){
        sz=this.diff(pt);
        return new OpenLayers.Pixel(sz.w,sz.h);
    },
    equal:function(pt){
        d = this.diff(pt);
        return (d.w==0&&d.h==0);
    },
    addSize:function(sz){
        return new OpenLayers.Pixel(this.x+sz.w, this.y+sz.h);
    },
    addX:function(w){
        return new OpenLayers.Pixel(this.x+w, this.y);
    },
    addY:function(h){
        return new OpenLayers.Pixel(this.x, this.y+h);
    },
    samePT:function(pt){
        return (this.x==pt.x && this.y==pt.y);
    }
};
OpenLayers.Size = Class.create();
OpenLayers.Size.prototype = {
    initialize: function(w,h) {
        this.w=w;<commit_msg>JSAN for OpenLayers.Pixel<commit_after>/*
* Convert degrees to radians
*/
OpenLayers.Util=new Object();




/**
* @class This class represents a screen coordinate, in x and y coordinates
*/
OpenLayers.Pixel = Class.create();
OpenLayers.Pixel.prototype = {
    
    /**
    * @param {int} x
    * @param {int} y
    */
    initialize: function(x, y) {
        this.x = x;
        this.y = y;
    },
    
    /**
    * @return {str} ex: "x=200,y=242"
    */
    toString:function() {
        return ("x="+this.x+",y="+this.y);
    },

    /**
    * @return {OpenLayers.Pixel}
    */
    copyOf:function() {
        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
    * 
    * @param {OpenLayers.Pixel} pt
    * 
    * @return {OpenLayers.Pixel}
    */
    diffPt:function(pt) {
        var sz = this.diff(pt);
        return new OpenLayers.Pixel(sz.w, sz.h);
    },
    
    /** returns whether or not the two points are equal
    * 
    * @param {OpenLayers.Pixel} pt
    * 
    * @return {bool}
    */
    equal:function(pt) {
        var d = this.diff(pt);
        return ((d.w==0) && (d.h==0));
    },


    /** Return a new Pixel with this pixel's x&y augmented by 
    *    the Size value passed in.
    * 
    * @param {OpenLayers.Size} sz
    * 
    * @return {OpenLayers.Pixel}
    */
    addSize:function(sz) {
        return new OpenLayers.Pixel(this.x+sz.w, this.y+sz.h);
    },


    /** Return a new Pixel with this pixel's x&y augmented by 
    *    the Size value passed in.
    * 
    * @param {int} w
    * 
    * @return {OpenLayers.Pixel}
    */
    addX:function(w) {
        return new OpenLayers.Pixel(this.x+w, this.y);
    },

    /** Return a new Pixel with this pixel's y augmented by 
    *    the int value passed in.
    * 
    * @param {int} h
    * 
    * @return {OpenLayers.Pixel}
    */
    addY:function(h) {
        return new OpenLayers.Pixel(this.x, this.y+h);
    },

    /** returns whether or not the two points are equal
    * 
    * @param {OpenLayers.Pixel} pt
    * 
    * @return {bool}
    */
    samePT:function(pt) {
        return ((this.x == pt.x) && (this.y == pt.y));
    }
};
OpenLayers.Size = Class.create();
OpenLayers.Size.prototype = {
    initialize: function(w,h) {
        this.w=w;
{'fraction_non_alphanumeric': 0.1563892145369285, 'fraction_numerical': 0.0023446658851113715, 'mean_word_length': 1.9769713886950453, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5769660', 'n_tokens_mistral': 1566, 'n_tokens_neox': 1478, 'n_words': 323}