summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-12-13 08:26:50 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-12-13 08:26:50 -0500
commit7c224a6e64ed658600585230609152d5d83f43bb (patch)
treef9b5209c808f62b061629aef77012ef969caaadd
parent3b847cdf484001e12f5c739fdbf5cc9ae72394d8 (diff)
math: rect: Add make-rect alias.
* chickadee/math/rect.scm (rect): New procedure.
-rw-r--r--chickadee/math/rect.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee/math/rect.scm b/chickadee/math/rect.scm
index 424614d..155fc19 100644
--- a/chickadee/math/rect.scm
+++ b/chickadee/math/rect.scm
@@ -22,6 +22,7 @@
#:use-module (chickadee math)
#:use-module (chickadee math vector)
#:export (make-rect
+ rect
rect?
rect-copy!
rect-copy
@@ -92,14 +93,15 @@
(f32vector-set! (unwrap-rect rect) i x))
(define-inlinable (make-rect x y width height)
- "Create a new rectangle WIDTH x HEIGHT in size whose bottom left
-corner is located at (X, Y)."
(with-new-rect rect
(rect-set! rect 0 x)
(rect-set! rect 1 y)
(rect-set! rect 2 width)
(rect-set! rect 3 height)))
+(define-inlinable (rect x y width height)
+ (make-rect x y width height))
+
(define (rect-copy! source-rect target-rect)
"Copy TARGET-RECT to SOURCE-RECT."
(bytevector-copy! (unwrap-rect source-rect)