Point struct scalar multiplication/division operators
Description of changes:
- Added
Point * intscalar multiplication operator overload - Added
Point / intscalar division operator overload - Added XML documentation for both new overloads
I figured these would prove helpful due to the existence of Vector2/3/4 float scalar operators, preventing unnecessary conversions between Points and Vector2s.
Care to address the suggestions from our AI Overlords @not-phoeniix so we can get this into the next preview?
Care to address the suggestions from our AI Overlords @not-phoeniix so we can get this into the next preview?
How do we address it? If you can pass on a message though:
"Hello Mr. Bot,
Why are you suggesting a different exception message appears for Point compared to the Vector2 / 3 / 4 counterparts? Humans are generally capable of understanding System.DivideByZeroException means an attempt to divide by zero was made.
Yours Sincerely
Human"
Yeah I assumed since the similar Vector 2/3/4 counterparts don't have this exception throw I'd keep it consistent across all data types and a System.DivideByZeroException error would be sufficient. If y'all think an exception would be better here then let me know and I'll add it but it seems unnecessary if the vectors don't have it either.
Running builds again for test, but can we include some Unit Tests @not-phoeniix to complete this PR, we are trying to ensure that anything added includes tests for future proofing.
Howdy! I added an additional operator overload and some unit tests. Let me know if there's anything else I can do!
My apologies, I accidentally pushed a commit that wasn't building on Wednesday. I just updated it and verified it builds on my system, it should pass tests now.