in h3_directedEdge.c [189:206]
int H3_EXPORT(isValidDirectedEdge)(H3Index edge) {
Direction neighborDirection = H3_GET_RESERVED_BITS(edge);
if (neighborDirection <= CENTER_DIGIT || neighborDirection >= NUM_DIGITS) {
return 0;
}
H3Index origin;
// Note: This call is also checking for H3_DIRECTEDEDGE_MODE
H3Error originResult = H3_EXPORT(getDirectedEdgeOrigin)(edge, &origin);
if (originResult) {
return 0;
}
if (H3_EXPORT(isPentagon)(origin) && neighborDirection == K_AXES_DIGIT) {
return 0;
}
return H3_EXPORT(isValidCell)(origin);
}