public void Test_SubGridTree_CalculateIndexOfCellContainingPosition_FailOutsideOfOrdinateRange() { ISubGridTree tree = new SubGridTree(SubGridTreeConsts.SubGridTreeLevels, 1.0, new SubGridFactory <NodeSubGrid, LeafSubGrid>()); Assert.False(tree.CalculateIndexOfCellContainingPosition(tree.MaxOrdinate + 1, tree.MaxOrdinate + 1, out int CellX, out int CellY)); CellX.Should().Be(int.MaxValue); CellY.Should().Be(int.MaxValue); Assert.False(tree.CalculateIndexOfCellContainingPosition(-tree.MaxOrdinate - 1, -tree.MaxOrdinate - 1, out CellX, out CellY)); CellX.Should().Be(int.MaxValue); CellY.Should().Be(int.MaxValue); Assert.False(tree.CalculateIndexOfCellContainingPosition(tree.MaxOrdinate + 1, -tree.MaxOrdinate - 1, out CellX, out CellY)); CellX.Should().Be(int.MaxValue); CellY.Should().Be(int.MaxValue); Assert.False(tree.CalculateIndexOfCellContainingPosition(-tree.MaxOrdinate - 1, tree.MaxOrdinate + 1, out CellX, out CellY)); CellX.Should().Be(int.MaxValue); CellY.Should().Be(int.MaxValue); }
public override string ToString() { return(Index.ToString() + " (" + CellX.ToString() + ", " + CellY.ToString() + ") - " + (Paths1?.Length ?? 0).ToString() + ", " + (Paths2?.Length ?? 0).ToString() + " - (" + CellMin.ToString() + " - " + CellMax.ToString() + ")"); }