Commit Graph

8 Commits

Author SHA1 Message Date
Mateusz Pusz 2d75493c4b feat: complex vector and tensor support added 2026-06-24 22:52:54 +02:00
Mateusz Pusz 1298be79ca refactor(cartesian_vector): model const operands in operator constraints
Refine the requires-expressions of the `cartesian_vector` operators to
constrain on `const`-qualified operands, matching the fact that the
operators take their arguments by `const` reference. A type whose
`operator+` (etc.) is not const-correct would previously have wrongly
satisfied the constraint.

The compound-assignment constraints are ref-qualified as well (mutable
lhs, const rhs) while keeping the `-> std::same_as<T&>` return-type check.

Also strengthen the unit-vector test to assert the resulting component
values (not just that the norm is 1) and to exercise the free
`unit_vector()` function.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 21:50:03 +02:00
Mateusz Pusz 6d555b73bd feat: norm() added to a cartesian_vector 2026-03-11 22:25:08 +01:00
Mateusz Pusz 2cf64f20c5 fix: cartesian_vector convertibility tests fixed 2024-11-14 20:40:08 +01:00
Mateusz Pusz a7cf015a3e feat: add compound assignment operators to cartesian_vector 2024-11-14 20:38:50 +01:00
Mateusz Pusz 4b5d37e83e feat: constructors of cartesian_vector refactored 2024-11-14 20:30:12 +01:00
Mateusz Pusz 420ffef6c5 fix(test): missing header files added 2024-11-12 18:12:36 +01:00
Mateusz Pusz 6c3c1fe5f7 feat: cartesian_vector added 2024-11-12 14:34:18 +01:00