public void updateCrosshairY(double candidateY,int rangeAxisIndex){
  double d=Math.abs(candidateY - this.anchorY);
  if (d < this.distance) {
    this.crosshairY=candidateY;
    this.rangeAxisIndex=rangeAxisIndex;
    this.distance=d;
  }
}

public void updateCrosshairY ( double candidateY , int rangeAxisIndex ) { double d = Math . abs ( candidateY - this . anchorY ) ; if ( d < this . distance ) { this . crosshairY = candidateY ; this . rangeAxisIndex = rangeAxisIndex ; this . distance = d ; } }
evaluates a y - value and if it is the closest to the anchor y - value it becomes the new crosshair value . < p > used in cases where only the y - axis is numerical .
