implement corner compensation for profile-points

NOTE: double checking with a calculator, I believe this implementation
is correct for rectangles. Since it is different than the existing
rectangle implementation, it means the current rectangle implementation
is wrong…