Comment

Comment by rmeby

I would imagine operator overloading helps with vectors so you can do things like:

    public static Vector operator -(Vector a, Vector b)
    {
        Vector v = new Vector();
        v.X = a.X - b.X;
        v.Y = a.Y - b.Y;

        return v;
    }
So then you can just write:

    Vector result = myVector1 - myVector2;
parent rmeby 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton