Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version