src/ol/reproj.js
function enlargeClipPoint(centroidX, centroidY, x, y) {
  const dX = x - centroidX;
  const dY = y - centroidY;
  const distance = Math.sqrt(dX * dX + dY * dY);
  return [Math.round(x + dX / distance), Math.round(y + dY / distance)];
}
function enlargeClipPoint(centroidX, centroidY, x, y) {
  const dX = x - centroidX;
  const dY = y - centroidY;
  const distance = Math.sqrt(dX * dX + dY * dY);
  return [Math.round(x + dX / distance), Math.round(y + dY / distance)];
}
function enlargeClipPoint ( centroidX , centroidY , x , y ) { const dX = x - centroidX ; const dY = y - centroidY ; const distance = Math . sqrt ( dX * dX + dY * dY ) ; return [ Math . round ( x + dX / distance ) , Math . round ( y + dY / distance ) ] ; }
Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap
in order to mask gaps caused by antialiasing.

@param {number} centroidX Centroid of the triangle (x coordinate in pixels).
@param {number} centroidY Centroid of the triangle (y coordinate in pixels).
@param {number} x X coordinate of the point (in pixels).
@param {number} y Y coordinate of the point (in pixels).
@return {import("./coordinate.js").Coordinate} New point 1 px farther from the centroid.
Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap in order to mask gaps caused by antialiasing .