diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-05 16:18:41 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-05 16:18:41 +0000 |
| commit | d8b7ded18c47e5e10d21ac162a42256d573a9e91 (patch) | |
| tree | b708bf078bea9540d697255a854b4c8e652d319d /src/helpers/Vector2D.cpp | |
| parent | c4e1a9b13baf9a0f8b58824803c4a9e63cbc41b3 (diff) | |
compositor: find windows in direction on floating
Diffstat (limited to 'src/helpers/Vector2D.cpp')
| -rw-r--r-- | src/helpers/Vector2D.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/helpers/Vector2D.cpp b/src/helpers/Vector2D.cpp index 118ba9d9..ae2484b3 100644 --- a/src/helpers/Vector2D.cpp +++ b/src/helpers/Vector2D.cpp @@ -45,3 +45,7 @@ bool Vector2D::inTriangle(const Vector2D& p1, const Vector2D& p2, const Vector2D return 0 <= a && a <= 1 && 0 <= b && b <= 1 && 0 <= c && c <= 1; } + +double Vector2D::size() const { + return std::sqrt(x * x + y * y); +} |
