private static Octants SafeOctant(Coordinate p0, Coordinate p1) { if (p0.Equals2D(p1)) { return(Octants.Zero); } return(Octant.GetOctant(p0, p1)); }
///<summary> /// Gets the octant of the segment starting at vertex <code>index</code> ///</summary> ///<param name="index">the index of the vertex starting the segment. Must not be the last index in the vertex list</param> ///<returns>octant of the segment at the vertex</returns> public Octants GetSegmentOctant(int index) { return(index == _pts.Length - 1 ? Octants.Null : Octant.GetOctant(_pts[index], _pts[index + 1])); }