summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-09-15 22:44:06 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-09-15 22:44:06 -0400
commit68dab43f0230fd54176e07b3ee2e119dfd44e25f (patch)
tree66beb8ebf0dcf1fb9b50cd32c745380be1222d7c
parent7934aa3f3583546b9cfdd73bb32477feb2465e57 (diff)
Clean up docstrings for rect module.
-rw-r--r--2d/rect.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/2d/rect.scm b/2d/rect.scm
index 4cabac3..b4bc3af 100644
--- a/2d/rect.scm
+++ b/2d/rect.scm
@@ -92,7 +92,7 @@
(rect-height rect)))
(define (%rect-move rect x y)
- "Move a rect by the given offset."
+ "Move RECT by the offset X, Y."
(make-rect (+ (rect-x rect) x)
(+ (rect-y rect) y)
(rect-width rect)
@@ -127,7 +127,7 @@ and y coordinates as separate arguments."
(%rect-inflate rect x y))))
(define (rect-union rect1 rect2)
- "Returns a rect that covers the area of rect1 and rect2."
+ "Return a rect that covers the area of RECT1 and RECT2."
(let ((x1 (min (rect-x rect1) (rect-x rect2)))
(x2 (max (rect-x2 rect1) (rect-x2 rect2)))
(y1 (min (rect-y rect1) (rect-y rect2)))
@@ -135,7 +135,7 @@ and y coordinates as separate arguments."
(make-rect x1 y1 (- x2 x1) (- y2 y1))))
(define (rect-clip rect1 rect2)
- "Returns the overlapping region of rect1 and rect2. If the rects do
+ "Return the overlapping region of RECT1 and RECT2. If the rects do
not overlap, a rect of size 0 is returned."
(let ((x1 (max (rect-x rect1) (rect-x rect2)))
(x2 (min (rect-x2 rect1) (rect-x2 rect2)))
@@ -144,7 +144,7 @@ not overlap, a rect of size 0 is returned."
(make-rect x1 y1 (max (- x2 x1) 0) (max (- y2 y1) 0))))
(define (rect-within? rect1 rect2)
- "Tests if rect2 is completely within rect1."
+ "Return #t if RECT2 is completely within RECT1."
(and (>= (rect-x rect2) (rect-x rect1))
(<= (rect-x rect2) (rect-x2 rect1))
(>= (rect-x2 rect2) (rect-x rect1))
@@ -155,7 +155,7 @@ not overlap, a rect of size 0 is returned."
(<= (rect-y2 rect2) (rect-y2 rect1))))
(define (rect-intersects? rect1 rect2)
- "Tests if rect2 overlaps rect1."
+ "Return #t if RECT2 overlaps RECT1."
(or (and (>= (rect-x rect2) (rect-x rect1))
(<= (rect-x rect2) (rect-x2 rect1)))
(and (>= (rect-x2 rect2) (rect-x rect1))
@@ -173,7 +173,7 @@ not overlap, a rect of size 0 is returned."
(define rect-contains?
(case-lambda
- "Tests if the given point is within rect."
+ "Return #t if the given point is within RECT."
((rect v)
(%rect-contains? rect (vx v) (vy v)))
((rect x y)