3 ms·
I agree, sadly. I'm not sure anyone who didn't already understand vector products is going to be helped by staring at "var rx = ay * bz - az * by; var ry = az *
by SEMW 11y ago
I agree, sadly. I'm not sure anyone who didn't already understand vector products is going to be helped by staring at "var rx = ay * bz - az * by; var ry = az * bx - ax * bz; var rz = ax * by - ay * bx" (as opposed to, say, [0]). Sure, it's precise and unambiguous, but it's missing the context that make it possible for a human to actually understand what it is as opposed to just calculating it (which the javascript interpreter is capable of doing fine on its own).
To say nothing of "var determinant = require('gl-mat2/determinant'); determinant(matrix)"! I guess the point is to go read the source code of the library, but I can't imagine many worse ways of learning linear algebra than reading the source code of optimized linear algebra routines.
[0] https://upload.wikimedia.org/wikipedia/commons/6/6e/Cross_product.gif https://upload.wikimedia.org/wikipedia/commons/6/6e/Cross_pr...
- mattdesl 11y agoThe point is not to understand linear algebra in a few lines of code. The point is to present the language of mathematics in another light; and hopefully demystify intimidating-looking equations that often appear in literature surrounding games, graphics and other fields of programming. The audience is hobbyists and self-taught developers with no formal background in mathematic notation. This audience might have no problem with a for loop, but the Summation symbol is (literally) just Greek to them.