Matrix library for games and graphics