PDA

View Full Version : help finding items Arrays


gsusInAPixel
10-19-2007, 11:39 PM
I'm trying to find two vertices that have the same point position. by comparing a vector coordinate with an array of vector coordinates. I'm using the findItem method. It doesn't work if i pass the item as a variable.

for example this doesn't work.
testArray = #( [1,2,3] , [3,2,1], [1,3,2] );
testVector = [3,2,1];
findItem testArray testVector;

returns 0 or false

but this does
testArray = #( [1,2,3] , [3,2,1], [1,3,2] );
findItem testArray [3,2,1];

returns 2, the second item in the array.

Any help is appreciated!

cyfer
10-19-2007, 11:48 PM
both of them Work !

check your code and trace that variable ... and gc()

gsusInAPixel
10-20-2007, 12:22 AM
You right and My bad! It was not working before but it does now.

CGTalk Moderation
10-20-2007, 12:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.