src/AircraftTrajectories/Models/TemporalGrid/Grid.cs
/// <summary>
/// Returns a x y index of the grid based on the entered corner coordinates
/// </summary>
/// <param name="x"></param>
/// <param name="y"></param>
/// <returns></returns>
Returns a x y index of the grid based on the entered corner coordinates
Returns a x y index of the grid based on the entered corner coordinates
public Point CoordinateToGridIndex(double x, double y)
        {
            int gridX = (int)Math.Floor((decimal)(x - LowerLeftCorner.X) / CellSize);
            int gridY = (int)Math.Floor((decimal)(y - LowerLeftCorner.Y) / CellSize);
            return new Point(gridX, gridY);
        }
public Point CoordinateToGridIndex ( double x , double y ) { int gridX = ( int ) Math . Floor ( ( decimal ) ( x - LowerLeftCorner . X ) / CellSize ) ; int gridY = ( int ) Math . Floor ( ( decimal ) ( y - LowerLeftCorner . Y ) / CellSize ) ; return new Point ( gridX , gridY ) ; }
Returns a x y index of the grid based on the entered corner coordinates
Returns a x y index of the grid based on the entered corner coordinates
None
x
double
None
y
double
None