class Vector2d extends AbstractVector implements Serializable {

    @Override
    public double distanceSquared(AbstractVector vec)
    {
        if (vec instanceof Vector2d)
        {
            Vector2d vec2 = (Vector2d)vec;
            double dx = myX - vec2.myX;
            double dy = myY - vec2.myY;
            return dx * dx + dy * dy;
        }
        return 0;
    }

    public  Vector2d(double x, double y);
    public  Vector2d(Vector2d vec);
    public  Vector2d(Vector2i vec);

}