<commit_before>
class int2
{
    x: number;
    y: number;

    constructor(x: number = 0, y: number = x)
    {
        this.x = x;
        this.y = y;
    }

    Copy() : int2
    {
        return new int2(this.x, this.y);
    }

    static Add(a: int2, b: int2) : int2
    {
        return new int2(
            a.x + b.x,
            a.y + b.y);
    }

    static Sub(a: int2, b: int2) : int2
    {
        return new int2(
            a.x - b.x,
            a.y - b.y);
    }

    static Mul(a: int2, b: int2) : int2
    {
        return new int2(
            a.x * b.x,
            a.y * b.y);
    }

    static Min(a: int2, b: int2) : int2
    {
        return new int2(
            Math.min(a.x, b.x),
            Math.min(a.y, b.y));
    }

    static Max(a: int2, b: int2) : int2
    {
        return new int2(
            Math.max(a.x, b.x),
            Math.max(a.y, b.y));
    }

    static Min0(a: int2) : int2
    {
        return new int2(
            Math.min(a.x, 0),
            Math.min(a.y, 0));
    }

    static Max0(a: int2) : int2
    {
        return new int2(
            Math.max(a.x, 0),
            Math.max(a.y, 0));
    }

    static Abs(a: int2) : int2
    {
        return new int2(
            Math.abs(a.x),
            Math.abs(a.y));
    }

    static Equal(a: int2, b: int2) : boolean
    {
        if (a == null || b == null)
            return false;
        return a.x == b.x && a.y == b.y;
    }
}

<commit_msg>Couple more math utilities<commit_after>
class int2
{
    x: number;
    y: number;

    static Zero = new int2(0, 0);
    static One = new int2(1, 1);

    constructor(x: number = 0, y: number = x)
    {
        this.x = x;
        this.y = y;
    }

    Copy() : int2
    {
        return new int2(this.x, this.y);
    }

    static Add(a: int2, b: int2) : int2
    {
        return new int2(
            a.x + b.x,
            a.y + b.y);
    }

    static Sub(a: int2, b: int2) : int2
    {
        return new int2(
            a.x - b.x,
            a.y - b.y);
    }

    static Mul(a: int2, b: int2) : int2
    {
        return new int2(
            a.x * b.x,
            a.y * b.y);
    }

    static Min(a: int2, b: int2) : int2
    {
        return new int2(
            Math.min(a.x, b.x),
            Math.min(a.y, b.y));
    }

    static Max(a: int2, b: int2) : int2
    {
        return new int2(
            Math.max(a.x, b.x),
            Math.max(a.y, b.y));
    }

    static Min0(a: int2) : int2
    {
        return new int2(
            Math.min(a.x, 0),
            Math.min(a.y, 0));
    }

    static Max0(a: int2) : int2
    {
        return new int2(
            Math.max(a.x, 0),
            Math.max(a.y, 0));
    }

    static Neg(a: int2) : int2
    {
        return new int2(
            -a.x,
            -a.y);
    }

    static Abs(a: int2) : int2
    {
        return new int2(
            Math.abs(a.x),
            Math.abs(a.y));
    }

    static Equal(a: int2, b: int2) : boolean
    {
        if (a == null || b == null)
            return false;
        return a.x == b.x && a.y == b.y;
    }
}


{'fraction_non_alphanumeric': 0.15195602974458455, 'fraction_numerical': 0.029421273844164243, 'mean_word_length': 1.1019021739130435, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7615980', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1218, 'n_words': 296}