/// Find our two new points, `spacing` distance away from targetPosition along line v
constflankerPositions=[
targetPosition.map((x,i)=>x+(spacing*u[i])),
targetPosition.map((x,i)=>x-(spacing*u[i])),
];
// WRONG radial does not mean "horizontal"; tangential does not mean "vertical"
if(spacingDirection==="radial"){
spacingPx=pos2XYPx[0]-pos1XYPx[0];
}elseif(spacingDirection==="tangential"){
spacingPx=pos2XYPx[1]-pos1XYPx[1];
}
/**
* Return the coordinates of the two flankers around a given target.
* @param {Number[]} targetPosition [x,y] position of the target stimuli
* @param {Number[]} fixationPosition [x,y] position of the fixation stimuli
* @param {("radial"|"tangential")} flankerOrientation String specifying the position of the flankers relative to the line between fixation and the target
* @param {Number} spacing Distance between the target and one flanker
* @returns {Number[][]} Array containing two [x,y] arrays, each representing the location of one flanker