@@ -21,8 +21,8 @@ such that
21
21
"""
22
22
abstract AbstractAffineTransformation <: Transformation
23
23
24
- matrix (:: AbstractAffineTransformation ) = error (" AbstractAffineTransformation's must implement matrix()" )
25
- translation (:: AbstractAffineTransformation ) = error (" AbstractAffineTransformation's must implement translation()" )
24
+ matrix (trans :: AbstractAffineTransformation ) = error (" AbstractAffineTransformation $( typeof (trans)) must implement matrix()" )
25
+ translation (trans :: AbstractAffineTransformation ) = error (" AbstractAffineTransformation $( typeof (trans)) must implement translation()" )
26
26
translation_reverse (:: AbstractAffineTransformation ) = matrix (trans) \ translation (trans)
27
27
28
28
# Default implementations
@@ -67,7 +67,7 @@ for optimization purposes.
67
67
"""
68
68
abstract AbstractLinearTransformation <: AbstractAffineTransformation
69
69
70
- matrix (:: AbstractLinearTransformation ) = error (" AbstractLinearTransformation's must implement matrix()" )
70
+ matrix (trans :: AbstractLinearTransformation ) = error (" AbstractLinearTransformation $( typeof (trans)) must implement matrix()" )
71
71
function translation (trans:: AbstractLinearTransformation )
72
72
m = matrix (trans)
73
73
s = size (m, 1 )
@@ -273,7 +273,7 @@ function matrix(trans::Rotation2D)
273
273
trans. sin trans. cos ]
274
274
end
275
275
276
- function transform_deriv (trans:: Rotation2D , x )
276
+ function matrix (trans:: Rotation2D )
277
277
@fsa [ trans. cos - trans. sin;
278
278
trans. sin trans. cos ]
279
279
end
362
362
363
363
@compat (trans:: Rotation )(x:: Tuple ) = Tuple (trans (Vec (x)))
364
364
365
- transform_deriv (trans:: Rotation , x ) = trans. matrix # It's a linear transformation, so this is easy!
365
+ matrix (trans:: Rotation ) = trans. matrix
366
366
@inline matrix (trans:: Rotation2D ) = trans. matrix
367
367
368
368
0 commit comments