https://9lib.org/document/z3dl42nm-cffi-min-max-pts-c-min-max-pts.html