FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

position-transform

Arguments: position matrix

Transforms the given position with the supplied matrix, which is a 2 by 2 array (or larger 2-dimensional array -- extra cells of the array are ignored). Even if the elements of matrix are floats, the returned position will have rounded whole number components. The transform works as follows:

xnew = A(0,0)*xold + A(0,1)*yold
ynew = A(1,0)*xold + A(1,1)*yold

For example:

 (setq ar (make-array '(2 2) 
            :initial-contents '((5.0 2.0) (3.0 1.0))))
 (setq p1 (make-position 7 10))
 (position-transform p1 ar)
returns
#.(make-position 55 31) ; = 5*7 + 2*10, 3*7 + 1*10

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version