Python to C# multidimensional array

  c++, multidimensional-array, python, translate

I need to translate this snippet from python to c#:

def _get_w_matrix(quaternions):
    w_matrix = [[[q[3], q[2], -q[1], q[0]],
                 [-q[2], q[3] , q[0], q[1]],
                 [q[1], -q[0], q[3], q[2]],
                 [-q[0], -q[1], -q[2], q[3]]] for q in quaternions] 

where quaternions is something like

[[0. 0. 0. 0.]
 [0. 2. 2. 0.]
 [2. 3. 1. 0.]]

I don’t understand which type of object is returned and how to write it down.

Source: Python Questions

LEAVE A COMMENT