private static double get ( DMatrixRMaj M , int index ) { if ( index < 0 ) { return - M . data [ - index - 1 ] ; } else { return M . data [ index - 1 ] ; } }
If the index is negative it returns the negative of the value at - index . Starts at 0