Coordinate order in Array2D
Leandro Caniglia
caniglia at mate.dm.uba.ar
Wed Jan 21 00:52:36 UTC 1998
Cristopher Oliver wrote:
CO> Hey folk! Why does Array2D at:at: and at:at:put: use a coordinate
order reversed from normal mathematical conventions? The first
coordinate is traditionally the matrix row. I just got bitten while
transliterating some cryptology code using matrices. This sort of
difference can cause severe brain hemorrhage.
I don't know why Array2D have this coordinate order but please note that the traditional matrix notation, in which the first index is the row, opposes to the also traditional (x, y) order. Smalltalk uses the (x , y) order in the class Point, so using first the column (x) and then the row (y) seems to adhere to a homogeneous convention.
Saludos,
Leandro
More information about the Squeak-dev
mailing list
|