Skip to content

Commit d8cd3a5

Browse files
committed
Clarify action and requirements of recenter
1 parent cd615e1 commit d8cd3a5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/core.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,17 @@ Base.inv(trans::IdentityTransformation) = trans
7474
recenter(trans::Union{AbstractMatrix,Transformation}, origin::AbstractVector) -> ctrans
7575
7676
Return a new transformation `ctrans` such that point `origin` serves
77-
as the origin-of-coordinates for `trans`. For example, if `trans` is a
78-
rotation matrix, then `ctrans` is a rotation around `origin`.
77+
as the origin-of-coordinates for `trans`. Translation by `±origin`
78+
occurs both before and after applying `trans`, so that if `trans` is
79+
linear we have
80+
81+
ctrans(origin) == origin
82+
83+
As a consequence, `recenter` only makes sense if the output space of
84+
`trans` is isomorphic with the input space.
85+
86+
For example, if `trans` is a rotation matrix, then `ctrans` rotates
87+
space around `origin`.
7988
"""
8089
function recenter(trans::Transformation, origin::AbstractVector)
8190
Translation(origin) trans Translation(-origin)

0 commit comments

Comments
 (0)