Simple linear algebra implementation using asm.js