Closed dhardy closed 3 years ago
Sounds good to me. splat
makes sense.
On second thoughts, there doesn't seem to be much point adding one
given the strict unit system — the exception being Vector
which supports dot
and cross
products.
I'm a bit confused why Size
and Vector
both exist — the differences are that Vector
has a few extra methods and that Size
has much longer component names. Is Size
just something that exists for historical reasons?
From a pure mathematical point of view Vector and Size are more or less the same thing, but in practice when you are building a browser engine with tons of layout and graphics code, having both x/y vectors and width/height sizes to match the higher level semantics of what you are doing is very nice. That's definitely something I would not change in euclid.
I don't see any constructor for equal values (splat/repeat/uniform/square). Seems like an obvious enough addition that it barely needs any justification? (I've found a few uses myself, even if some of them are for zero/one.) It might be best to use SIMD notation (splat)?
Also I see there are
zero
constructors overnum-traits::Zero
. I think it would be worth addingone
in analogous fashion?