diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-05-02 23:41:34 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-05-02 23:41:34 -0400 |
commit | a160708eac84695e6d27adfcaed8a40ecb9208fc (patch) | |
tree | aafa1dbe04a1579caa192a22aa92c045231f28b8 | |
parent | 5969fc30fda498220b8756441acd4ec64dbfe9f1 (diff) |
Prefix matrix operations with "transform-".
* 2d/transform.scm (translate, scale, rotate): Renamed.
(transform-translate, transform-scale, transform-rotate): New names.
-rw-r--r-- | 2d/transform.scm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/2d/transform.scm b/2d/transform.scm index 5478770..df2f943 100644 --- a/2d/transform.scm +++ b/2d/transform.scm @@ -35,9 +35,9 @@ transform-vector2 transform+ transform* - translate - scale - rotate + transform-translate + transform-scale + transform-rotate orthographic-projection)) (define-record-type <transform> @@ -132,7 +132,7 @@ identity-transform if called without any arguments." (%make-transform m3))) (reduce mul identity-transform transforms)) -(define (translate v) +(define (transform-translate v) "Return a new transform that translates the x and y axes by the vector2 V." (make-transform 1 0 0 (vx v) @@ -140,7 +140,7 @@ vector2 V." 0 0 1 0 0 0 0 1)) -(define (scale v) +(define (transform-scale v) "Return a new transform that scales the X and Y axes by the vector2 V." (make-transform (vx v) 0 0 0 @@ -148,7 +148,7 @@ V." 0 0 1 0 0 0 0 1)) -(define (rotate angle) +(define (transform-rotate angle) "Return a new transform that rotates the Z axis by ANGLE radians." (make-transform (cos angle) (- (sin angle)) 0 0 (sin angle) (cos angle) 0 0 |