If the coordinates are precessed to epoch B1875.0, the constellation boundaries lie neatly along the equatorial coordinate grid, allowing simpler tests against boundary segments.
Roman 1987 describes a basic algorithm and provides implementations in C and F77.
Glaschke 2010 makes a binary partition of the sky for fast lookup and provides an implementation in ...
I realized it's the problem of checking whether a point is inside a polygon or not.
I'm now checking the code at http://csharphelper.com/blog/2014/07/determine-whether-a-point-is-inside-a-polygon-in-c/#:~:text=For%20example%2C%20if%20the%20point,zero%2C%20the%20point%20is%20outside.