docs: private double computeAngle(RoadPolyline segment, boolean fromStartPoint) {
  		double angle = Double.NaN;
  		Point2d p1 = null;
  		Point2d p2 = null;
  		if (segment.getPointCount() > 1) {
  			if (fromStartPoint) {
  				final RoadConnection startPoint = segment.getBeginPoint(StandardRoadConnection.class);
  				if (startPoint == this) {
  					p1 = startPoint.getPoint();
  					p2 = segment.getPointAt(1);
  					// Because the Y axis is directly to the bottom of the screen
  					// it is necessary to invert it to reply an counterclockwise angle
  					angle = MathUtil.clampCyclic(
  							Vector2D.signedAngle(
  									1, 0, p2.getX() - p1.getX(), p1.getY() - p2.getY()),
  							0, MathConstants.TWO_PI);
  				} else {
  					throw new IllegalArgumentException(
  							Locale.getString("ERROR_ALREADY_CONNECTED_START", //$NON-NLS-1$
  									segment,
  									p1,
  									p2,
  									startPoint));
  				}
  			} else {
  				final RoadConnection endPoint = segment.getEndPoint(StandardRoadConnection.class);
  				if (endPoint == this) {
  					p1 = endPoint.getPoint();
  					p2 = segment.getAntepenulvianPoint();
  					// Because the Y axis is directly to the bottom of the screen
  					// it is necessary to invert it to reply an counterclockwise angle
  					angle = MathUtil.clampCyclic(
  							Vector2D.signedAngle(
  									1, 0, p2.getX() - p1.getX(), p1.getY() - p2.getY()),
  							0, MathConstants.TWO_PI);
  				} else {
  					throw new IllegalArgumentException(
  							Locale.getString("ERROR_ALREADY_CONNECTED_END", //$NON-NLS-1$
  									segment,
  									p1,
  									p2,
  									endPoint));
  				}
  			}
  
  			if (Double.isNaN(angle) || Double.isInfinite(angle)) {
  				throw new IllegalArgumentException(
  						Locale.getString("ERROR_SAME_POINTS", //$NON-NLS-1$
  								segment, p1, p2));
  			}
  		} else {
  			throw new IllegalArgumentException(
  					Locale.getString("ERROR_NOT_ENOUGH_POINTS", //$NON-NLS-1$
  							segment));
  		}
  
  		return angle;
  	}