vec
vec copied to clipboard
Class vs individual exports
I know the size of this package ain't big but I wonder... any particular reason behind choosing the class with only static fields? I've seen some of your other packages are using individual exports (for example the @tldraw/svg)
My main motivation was that a utility class would let me use extremely generic names, like add and mul, which were initially difficult to identify when exported as individual functions. I ended up using import * as Vec throughout my code, which made me think I should just use a class. 🤷♂️