Lucene.Net.Spatial.SpatialTestCase.randomRectangle C# (CSharp) Метод

randomRectangle() защищенный Метод

protected randomRectangle ( ) : IRectangle
Результат IRectangle
        protected virtual IRectangle randomRectangle()
        {
            IRectangle WB = ctx.WorldBounds;
            int rW = (int)randomGaussianMeanMax(10, WB.Width);
            double xMin = randomIntBetween((int)WB.MinX, (int)WB.MaxX - rW);
            double xMax = xMin + rW;

            int yH = (int)randomGaussianMeanMax(Math.Min(rW, WB.Height), WB.Height);
            double yMin = randomIntBetween((int)WB.MinY, (int)WB.MaxY - yH);
            double yMax = yMin + yH;

            return ctx.MakeRectangle(xMin, xMax, yMin, yMax);
        }