コード例 #1
0
 public static IEnumerable <FractionalLineAlgorithm.Coordinate> GetRelevantNodeCoordinates(Vector2d start, Vector2d end)
 {
     //Note: 99% sure this is deterministic enough for use in simulation.
     foreach (FractionalLineAlgorithm.Coordinate coor in FractionalLineAlgorithm.Trace(
                  Partition.GetRelativeX(start.x).ToDouble(),
                  Partition.GetRelativeX(start.y).ToDouble(),
                  Partition.GetRelativeY(end.x).ToDouble(),
                  Partition.GetRelativeY(end.y).ToDouble()))
     {
         //int indexX = coor.X;
         //int indexY = coor.Y;
         yield return(coor);
     }
 }