Pay for Hesitation: boundary

Pages

顯示具有 boundary 標籤的文章。 顯示所有文章
顯示具有 boundary 標籤的文章。 顯示所有文章

2010年8月9日 星期一

Idiom: Check Boundary

point.x = Math.min(p.x, boundary.LeftBoundary);
point.x = Math.max(p.x, boundary.RightBoundary);

point.y = Math.min(p.y, boundary.BottomBoundary);
point.y = Math.max(p.y, boundary.TopBoundary);