[Cuis] Array2D newSize:

H. Hirzel hannes.hirzel at gmail.com
Thu Jul 16 08:28:07 CDT 2015


Created an issue for me to sometime later this year add to the documentation

https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/issues/68

--Hannes

On 7/16/15, Juan Vuletich <juan at jvuletich.org> wrote:
> On 7/15/2015 7:23 PM, Dan Norton wrote:
>> Maybe it's my dyslexia, but isn't this backward?
>>
>> "Array2D newSize: 2 at 3" produces an array with 3 rows and 2 columns:
>> | nil nil |
>> | nil nil |
>> | nil nil |
>>
>> IMO it should be:
>> | nil nil nil |
>> | nil nil nil |
>>
>> For example, in Squeak, "MatrixTransform2x3 identity" produces:
>> MatrixTransform2x3(
>> 1.0	0.0	0.0
>> 0.0	1.0	0.0
>> )
>>
>> Please correct me if I'm wrong.
>>
>> OK, you're wrong - as long as there is a subclass called Matrix in
>>
>> LinearAlgebra.pck.st
>>
>> Use Matrix instead of Array2d.
>>
>> (whew)
>
> No, you are not wrong.
>
> But use Matrix, or maybe FloatMatrix if it makes sense for you.
>
> Also keep in mind that Cuis has AffineTransformation, that is almost
> identical to Squeak's MatrixTransform2x3 (except for Squeak's doing some
> very arguable rounding to integer of results).
>
> Cheers,
> Juan Vuletich
>
> _______________________________________________
> Cuis mailing list
> Cuis at jvuletich.org
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>




More information about the Cuis mailing list