public DistanceSample CombinedWith(DistanceSample other) { if ((!HasSample) || (other.HasSample && (other.Distance < Distance))) { return(other); } return(this); }
public int Ofs(int x, int y, DistanceSample d) { return OfsComponent(x, d.OffsetX, this.Width) + OfsComponent(y, d.OffsetY, this.Height) * this.Width; }