Example #1
0
 public ParametricLine.Intersection LongitudeIntersection(double lon)
 {
     ParametricLine.Intersection intersection = new ParametricLine.Intersection();
     if (this.s.lon == this.d.lon)
     {
         intersection.IsParallel = true;
     }
     else
     {
         intersection.IsParallel = false;
         intersection.t          = (lon - this.s.lon) / (this.d.lon - this.s.lon);
     }
     return(intersection);
 }
Example #2
0
		public ParametricLine.Intersection LongitudeIntersection(double lon)
		{
			ParametricLine.Intersection intersection = new ParametricLine.Intersection();
			if (this.s.lon == this.d.lon)
			{
				intersection.IsParallel = true;
			}
			else
			{
				intersection.IsParallel = false;
				intersection.t = (lon - this.s.lon) / (this.d.lon - this.s.lon);
			}
			return intersection;
		}
Example #3
0
		public ParametricLine.Intersection LatitudeIntersection(double lat)
		{
			ParametricLine.Intersection intersection = new ParametricLine.Intersection();
			if (this.s.lat == this.d.lat)
			{
				intersection.IsParallel = true;
			}
			else
			{
				intersection.IsParallel = false;
				intersection.t = (lat - this.s.lat) / (this.d.lat - this.s.lat);
			}
			return intersection;
		}
Example #4
0
 public int CompareTo(object obj)
 {
     if (!(obj is ParametricLine.Intersection))
     {
         return(1);
     }
     ParametricLine.Intersection intersection = (ParametricLine.Intersection)obj;
     if (intersection.IsParallel && this.IsParallel)
     {
         return(0);
     }
     if (intersection.t == this.t)
     {
         return(0);
     }
     if (intersection.t > this.t)
     {
         return(-1);
     }
     return(1);
 }