private void AdjustNearest(int xLeftProj, int xRightProj, int yProj)
{
if (yProj < 0 || yProj >= YResolution)
return;
if (xLeftProj >= 0 && xLeftProj < XResolutionInternal)
{
if (nearestLeft[xLeftProj, yProj] == null)
nearestLeft[xLeftProj, yProj] = xRightProj;
else
nearestLeft[xLeftProj, yProj] = Math.Min(nearestLeft[xLeftProj, yProj].Value, xRightProj);
}
if (xRightProj >= 0 && xRightProj < XResolutionInternal)
{
if (nearestRight[xRightProj, yProj] == null)
nearestRight[xRightProj, yProj] = xLeftProj;
else
nearestRight[xRightProj, yProj] = Math.Max(nearestRight[xRightProj, yProj].Value, xLeftProj);
}
}