Area() public method

public Area ( ) : int
return int
コード例 #1
0
ファイル: Rect.cs プロジェクト: liaoheping/OCRonet
        /// <summary>
        /// Origin name: fraction_covered_by
        /// </summary>
        public float FractionCoveredBy(Rect other)
        {
            Rect isect = Intersection(other);
            int  area  = Area();

            if (area > 0)
            {
                return(isect.Area() / (float)area);
            }
            else
            {
                return(-1);
            }
        }