Reproduce this error by performing a gesture which has only 1 point. The error comes from this line [1] when the index value is -1. After further investigation I found out that creating a gesture via new Gesture(Points) will return a gesture with an array points initialized with NaN values.
[1]
|
matched[index] = true; // point index from the 2nd cloud is matched to point i from the 1st cloud |