math: rect2 clipping