class Envelope {

    public Envelope withSideRatioNotTooSmall( )
    {
        double[] from = Arrays.copyOf( this.min, min.length );
        double[] to = Arrays.copyOf( this.max, max.length );
        double highestDiff = -Double.MAX_VALUE;
        double[] diffs = new double[from.length];
        for ( int i = 0; i < from.length; i++ )
        {
            diffs[i] = to[i] - from[i];
            highestDiff = Math.max( highestDiff, diffs[i] );
        }
        final double mindiff = highestDiff / MAXIMAL_ENVELOPE_SIDE_RATIO;
        for ( int i = 0; i < from.length; i++ )
        {
            if ( diffs[i] < mindiff )
            {
                to[i] = from[i] + mindiff;
            }
        }
        return new Envelope( from, to );
    }

    public  Envelope( Envelope e );
    public  Envelope( double[] min, double[] max );
    public  Envelope( double xmin, double xmax, double ymin, double ymax );

}