Example #1
0
        public TriangleRelation GetRelationTo(QuasiTriangle triangle)
        {
            int hasTheFirst = System.Convert.ToInt32(triangle.HasThePoint(this.First));

            int hasTheSecond = System.Convert.ToInt32(triangle.HasThePoint(this.Second));

            int hasTheThird = System.Convert.ToInt32(triangle.HasThePoint(this.Third));

            return((TriangleRelation)((hasTheFirst * (int)TriangleRelation.MeetAtFirst) +
                                      hasTheSecond * (int)TriangleRelation.MeetAtSecond +
                                      hasTheThird * (int)TriangleRelation.MeetAtThird));
        }
Example #2
0
        public override bool Equals(object obj)
        {
            if (obj.GetType() == typeof(QuasiTriangle))
            {
                QuasiTriangle tempTriangle = (QuasiTriangle)obj;

                return(tempTriangle.First == this.First &&
                       tempTriangle.Second == this.Second &&
                       tempTriangle.Third == this.Third);
            }

            return(false);
        }