Random interval generator for a game
It might be worth introducing an abstraction for the type of piecewise linear functions that bound your intervals. For example (warning, there might be errors)

class PiecewiseLinear
{
    private readonly Vector2 start;
    private readonly Vector2 end;

    public PiecewiseLinear(Vector2 start, Vector2 end)
    {
        this.start = start;
        this.end = end;
    }

    public double ValueAt(double x)
    {
        if (x &gt;= end.x)
        {
            return end.y;
        }

        return (start + (x / (end.x - start.x)) * (end - start)).y;
    }
}


The class name is not ideal, as the class only deals with a very specialised case, but I can't think of a more specific name.

Anyway, you can now use it like this

var max = new PiecewiseLinear(new Vector2(0, 5), new Vector2(3, 2));
var min = new PiecewiseLinear(new Vector2(0, 4), new Vector2(2, 1));

for (double x = 0; x &lt;= 4; x += 0.25)
{
    Console.WriteLine("({0}, {1})", x, max.ValueAt(x) - min.ValueAt(x));
}