FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 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 9.0 page.
Created 2015.5.21.

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