by VikingCoder · 4y ago · 0 comments
That way, you can have sparse vectors, or sparse matrices. It doesn't matter how many dimensions are specified for your object, stored in memory. It gets transformed the same.
Have a point at the origin? [1] Done. It doesn't matter if it's a 2D, 3D, 7D.
Have a 0-vector? [0] Done.
Have a 2D point? [1, x, y]
Have a 3D point? [1, x, y, z]
Have a 1D vector? [0, x]
I honestly don't know why we don't all do it this way.
No comments yet.