anchor.diff:  
   // Check if requested tile (X,Y) is within Map boundaries
   // X,Y are unsigned int, usually called from loops, hence no TKMPoint can be used
  -function TKMTerrain.TileInMapCoords(X,Y: Integer; aInset: Byte): Boolean;
  +function TKMTerrain.TileInMapCoords(const X,Y: Integer; const aInset: Byte): Boolean;
   begin
     // Direct comparison is a bit faster, than using InRange
     Result := (X >= 1 + aInset) and (X <= fMapX - 1 - aInset) and (Y >= 1 + aInset) and (Y <= fMapY - 1 - aInset);
   end;
   
   
  -function TKMTerrain.TileInMapCoords(X,Y: Integer): Boolean;
  +function TKMTerrain.TileInMapCoords(const X,Y: Integer): Boolean;
   begin
     // Direct comparison is a bit faster, than using InRange
     Result := (X >= 1) and (X <= fMapX - 1) and (Y >= 1) and (Y <= fMapY - 1);
   end;
   
   
  -function TKMTerrain.CoordsWithinMap(X, Y: Single; aInset: Byte = 0): Boolean;
  +function TKMTerrain.CoordsWithinMap(const X, Y: Single; const aInset: Byte = 0): Boolean;
   begin
     Result :=     (X >= 1 + aInset)
               and (X <= fMapX - 1 - aInset)
  
positive.code: end;
  
  
  function TKMTerrain.PointFInMapCoords(const aPointF: TKMPointF; aInset: Byte = 0): Boolean;
  begin
    Result := CoordsWithinMap(aPointF.X, aPointF.Y, aInset);
  end;
  
  
  function TKMTerrain.TileInMapCoords(const aCell: TKMPoint; Inset: Byte = 0): Boolean;
  begin
    Result := TileInMapCoords(aCell.X, aCell.Y, Inset);
  end;
  
  
  function TKMTerrain.TileInMapCoords(X,Y: Integer; aInsetRect: TKMRect): Boolean;
  begin
    Result :=     InRange(X, 1 + aInsetRect.Left, fMapX - 1 + aInsetRect.Right)
              and InRange(Y, 1 + aInsetRect.Top,  fMapY - 1 + aInsetRect.Bottom);
  
negative.code: end;
  
  
  function TKMTerrain.EnsureVerticesRectWithinMap(const aRectF: TKMRectF; const aInset: Single = 0): TKMRectF;
  begin
    Result.Left   := EnsureRangeF(aRectF.Left,   aInset, fMapX - aInset);
    Result.Right  := EnsureRangeF(aRectF.Right,  aInset, fMapX - aInset);
  