Rick van Dam
Rick van Dam
So first to be really sure this wasnt just some exception to the rule I added more benchmarks and measured the current performance:  Then I changed those operators and...
I didnt removed them I changed the reversed variant to use the logic of the non reversed variant in order to reduce code duplication.
> Ah, makes sense. If this is at the cost of performance, I would value performance over avoiding code duplication in this case, otherwise good call. No I measured it...
Now my PR is merged aside from the much better performance when using these operators adding the in keyword is really trivial now and will require no other code changes:...
There are cases where defensive copies might occur when using the `in` keyword. This can reduce the performance. Making the struct `readonly` will prevent this. https://blogs.msdn.microsoft.com/seteplia/2018/03/07/the-in-modifier-and-the-readonly-structs-in-c/ However since the `X`,...
As a further enhancement one can add readonly to properties and methods etc now in C#8.0 to denote they do not change state: https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#readonly-members (in C# 7.3 this was only...
Now duality is using C# 7.3 this issue can get picked up at any time: - Add in keyword - Consider making Vectors readonly to reduce the amount of defensive...
> Making vector or matrix types readonly would be quite a usability downgrade, since that would prevent field assignments Agreed, one could also consider adding methods like `WithX(float value)` that...
> I acknowledge the technical possibility, but that just reads terrible and wrong Hmm I don't think its that bad though. However another reason not to implement my suggestion (yup...
Iam thinking its best for ppl to simply start from scratch and copy their source files into the new template. Since .cs files are included by default that should just...