refactor: use unity.mathematics.half in place of added types#2473
refactor: use unity.mathematics.half in place of added types#2473
Conversation
| /// </remarks> | ||
| public struct HalfVector3 : INetworkSerializable | ||
| { | ||
| public const int Size = 3; |
There was a problem hiding this comment.
Is this Size or Length?
Size kind of implies size in the memory or on the network, usually in bytes but it's not it right?
Length is implying "how many items does this container contain?" and that's 3 items — and 3 items x 2 bytes = 6 bytes in total.
Maybe a nit-pick but wanted to bring it up (same applies to HalfVector4 too)
There was a problem hiding this comment.
or in general, maybe never expose this constant value to public since we're using it internally for the for loops and 3 for HalfVector3 and 4 for HalfVector4 are kind of obvious by their name — what do you think?
There was a problem hiding this comment.
Good call out. That needed to be non-public and length does indeed make more sense then size.
Reducing the footprint of the Unity.Mathematics types due to the vast amount of added public API changes required.
This should have minimal impact on the API footprint.
Testing and Documentation