https://github.com/anegostudios/vsapi/blob/master/Math/Vector/Vec3d.cs#L91
Id like to suggest that the Cross method is renamed to CrossCopy as it writes the result into a new object instead of editing itself. That seems in cohesive with the rest of the vec class since all other methods self edit.
eg.
Sub() -> this, Add(x) -> this [...]
while
SubCopy() -> Vec3d, AddCopy() -> Vec3d [...]
But in the case of Cross it is Cross() -> Vec3d while it should be Cross() -> this for the sake of cohesiveness.
However given that this implementation is likely used all over the place, be it in game or in mods, i doubt this suggestion is great to go with.
As such perhaps Cross stays as is but a new method is added, like CrossMut which edits the obj its called upon. Otherwise i dont see a method for me to run cross product math without creating new waste for the gc each time i do so. There is no Cross() -> this variant to be found anywhere.
Have a nice rest of your day o/
https://github.com/anegostudios/vsapi/blob/master/Math/Vector/Vec3d.cs#L91
Id like to suggest that the
Crossmethod is renamed toCrossCopyas it writes the result into a new object instead of editing itself. That seems in cohesive with the rest of the vec class since all other methods self edit.eg.
Sub() -> this,Add(x) -> this[...]while
SubCopy() -> Vec3d,AddCopy() -> Vec3d[...]But in the case of
Crossit isCross() -> Vec3dwhile it should beCross() -> thisfor the sake of cohesiveness.However given that this implementation is likely used all over the place, be it in game or in mods, i doubt this suggestion is great to go with.
As such perhaps
Crossstays as is but a new method is added, likeCrossMutwhich edits the obj its called upon. Otherwise i dont see a method for me to run cross product math without creating new waste for the gc each time i do so. There is noCross() -> thisvariant to be found anywhere.Have a nice rest of your day o/