code: public Result<Tupple2<float[], float[]>> getOffMeshConnectionPolyEndPoints(long prevRef, long polyRef) {
          if (polyRef == 0) {
              return Result.invalidParam("polyRef = 0");
          }
  
          // Get current polygon
          int[] saltitip = decodePolyId(polyRef);
          int salt = saltitip[0];
          int it = saltitip[1];
          int ip = saltitip[2];
          if (it >= m_maxTiles) {
              return Result.invalidParam("Invalid tile ID > max tiles");
          }
          if (m_tiles[it].salt != salt || m_tiles[it].data.header == null) {
              return Result.invalidParam("Invalid salt or missing tile header");
          }
          MeshTile tile = m_tiles[it];
          if (ip >= tile.data.header.polyCount) {
              return Result.invalidParam("Invalid poly ID > poly count");
          }
          Poly poly = tile.data.polys[ip];
  
          // Make sure that the current poly is indeed off-mesh link.
          if (poly.getType() != Poly.DT_POLYTYPE_OFFMESH_CONNECTION) {
              return Result.invalidParam("Invalid poly type");
          }
  
          // Figure out which way to hand out the vertices.
          int idx0 = 0, idx1 = 1;
  
          // Find link that points to first vertex.
          for (int i = poly.firstLink; i != DT_NULL_LINK; i = tile.links.get(i).next) {
              if (tile.links.get(i).edge == 0) {
                  if (tile.links.get(i).ref != prevRef) {
                      idx0 = 1;
                      idx1 = 0;
                  }
                  break;
              }
          }
          float[] startPos = new float[3];
          float[] endPos = new float[3];
          vCopy(startPos, tile.data.verts, poly.verts[idx0] * 3);
          vCopy(endPos, tile.data.verts, poly.verts[idx1] * 3);
          return Result.success(new Tupple2<>(startPos, endPos));
  
      }
docs: / the prevRef parameter.