code: public static String formatBearing(List<Double[]> bearings) {
      if (bearings.isEmpty()) {
        return null;
      }
  
      String[] bearingFormatted = new String[bearings.size()];
      for (int i = 0; i < bearings.size(); i++) {
        if (bearings.get(i).length == 0) {
          bearingFormatted[i] = "";
        } else {
          bearingFormatted[i] = String.format(Locale.US, "%s,%s",
            TextUtils.formatCoordinate(bearings.get(i)[0]),
            TextUtils.formatCoordinate(bearings.get(i)[1]));
        }
      }
      return TextUtils.join(";", bearingFormatted);
    }
docs: Formats the bearing variables from the raw values to a string which can than be used for the
  request URL.
  
  @param bearings a List of doubles representing bearing values
  @return a string with the bearing values
  @since 3.0.0