3 ms·
I used resources from bivector for part of implementation for excalidraw.com, and it did what I needed. It was an interesting lesson though in the difference be
by xixixao 6y ago
I used resources from bivector for part of implementation for excalidraw.com, and it did what I needed. It was an interesting lesson though in the difference between mathematical and software engineering priorities. I didn't need to support arbitrary dimensions (only 2D). I wanted my code to be readable, and functions to have typed arguments (so a function like orthogonalLineThroughPoint should take a line and point, and you shouldn't be able to pass the arguments in wrong order). So I wrapped the hard-to-remember and understand operators in a more friendly API, but it's a question whether I even need most of the "beauty" of the math then, or just unroll the few algos I need into the API. One counter argument is applying transformations to all objects uniformly. So I left the implementation as is in the end, but I wouldn't be surprised if it got ripped out later to save app size (if that was a big concern).