I am looking for the st_dwithin postgis source code. I want to learn the way postgis determines whether a given geometry is within a given radius to another geometry.
One of the best place to search and explore source code for PostGIS is through the GitHub mirror:
For instance, search
ST_DWithin, where you will then search
lw_dist2d_recursive, and then different versions of
lw_dist2d_distribute* functions ...
You can also explore the Doxygen documents for a high-level view of the liblwgeom library, which is part of PostGIS. E.g. for
measures.c, which is used by