private boolean isPositionOnLine(final float x,final float y,final float node1X,final float node1Y,final float node2X,final float node2Y){
  float tolerance=DataStyle.getCurrent().wayToleranceValue / 2f;
  if (GeoMath.isBetween(x,node1X,node2X,tolerance) && GeoMath.isBetween(y,node1Y,node2Y,tolerance)) {
    return (GeoMath.getLineDistance(x,y,node1X,node1Y,node2X,node2Y) < tolerance);
  }
  return false;
}

private boolean isPositionOnLine ( final float x , final float y , final float node1X , final float node1Y , final float node2X , final float node2Y ) { float tolerance = DataStyle . getCurrent ( ) . wayToleranceValue / 2f ; if ( GeoMath . isBetween ( x , node1X , node2X , tolerance ) && GeoMath . isBetween ( y , node1Y , node2Y , tolerance ) ) { return ( GeoMath . getLineDistance ( x , y , node1X , node1Y , node2X , node2Y ) < tolerance ) ; } return false ; }
checks if the x , y - position plus the tolerance is on a line between node1 ( x , y ) and node2 ( x , y ) .
