Matrix intersection using a key of 0's and 1's

Godot Version



is there some function that I could leverage where I could use a matrix of 0’s and 1’s as a key to get what is in a another matrix at given x y coordinates.

a =[[ 1, 2, 3, 4],
    [ 5, 6, 7, 8],     
    [ 9,10,11,12],     

b = [[0,1],


No, because matrix objects in godot have semantics tied to the Transform object, but it is trivial to write a generic function for that. Do you need a vector of vectors, tho? a single vector with a width shortens the math and improves performance.