Casts matrix to a new type. It should be matrix type too, with equal quantity of lines and cols.
See Implementation
Casts matrix to a new type. It should be matrix type too, with equal quantity of lines and cols.