Seth Hillbrand
e3231e6996
Rework VECTOR2D promotion rules
...
VECTOR + scalar = vector type (KiROUND when VECTOR is integral and
scalar is float)
VECTOR + VECTOR = common type vector
Implemented with concepts in template rules - SWIG compatible
2024-06-15 13:41:07 -07:00
Seth Hillbrand
6df16d053e
Add specialization for unsigned scalar add/sub
...
Adding/subtracting an unsigned scalar to a signed vector should maintain
the same signed vector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18212
2024-06-14 17:27:59 -07:00
Seth Hillbrand
8dd93501cf
Add additional VECTOR2 tests
...
Check overflow, addition using alternate value representations and
clamping
2024-06-10 15:21:44 -07:00
Seth Hillbrand
37191720ca
Add common VECTOR2 test cases
2024-06-10 15:12:57 -07:00
Marek Roszko
c31b5eb7d8
Fix errant typecast in VECTOR2<T>::Resize
...
This fails QA on Windows but not Linux
2023-05-29 19:34:40 -04:00
Marek Roszko
8b3f5de620
Add a simple testcase for VECTOR2I::Resize
2023-05-29 18:32:56 -04:00
Marek Roszko
8d4db2edf5
Move tests around
2023-04-24 22:09:36 -04:00