Revit.SDK.Samples.ObjectViewer.CS.Sketch3D.PreTreatBBox C# (CSharp) Method

PreTreatBBox() private method

pretreat BBoundingBox so that its height or width will be bigger than zero
private PreTreatBBox ( RectangleF bbox ) : RectangleF
bbox System.Drawing.RectangleF
return System.Drawing.RectangleF
        private RectangleF PreTreatBBox(RectangleF bbox)
        {
            const float EpsilonLen = 0.001f;
            if (bbox.Height < EpsilonLen)
            {
                bbox.Height = 0.001f;
            }
            if (bbox.Width < EpsilonLen)
            {
                bbox.Width = 0.001f;
            }
            return bbox;
        }