Math tunes

This commit is contained in:
IlyaShurupov 2024-07-17 09:38:46 +03:00
parent 32f53294d3
commit c1ccef6fbb
2 changed files with 6 additions and 4 deletions

View file

@ -360,6 +360,8 @@ namespace tp {
Vec normal() { return { -y, x }; }
[[nodiscard]] alnf length2() const { return (x * x + y * y); }
[[nodiscard]] halnf max() const { return tp::max(x, y); }
[[nodiscard]] halnf min() const { return tp::min(x, y); }
[[nodiscard]] alnf length() const {
Type const tmp = (Type) (x * x + y * y);