Gan_Matrix *pmMatrix; pmMatrix = gan_mat_alloc(3,4); gan_mat_fill_va ( pmMatrix, 3, 4, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0 ); gan_mat34_from_mat_q ( pmMatrix, &m34A );or
m34A = gan_mat34_from_mat_s ( pmMatrix );fill m34A with the same values as the general matrix. Calling these functions with a general matrix pmMatrix not having the same size as the fixed size matrix is an error.
Error detection: The conversion routines return the pointer to the filled fixed size matrix, or NULL on failure, invoking the Gandalf error handle in the latter case.