diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-03-08 08:50:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 08:50:20 +0100 |
commit | 8ded15b035e9db959b7669ec72b38d1a94a8df30 (patch) | |
tree | d19576f1eabb984b162098b3caad1a9666abb0e8 /core/math | |
parent | 079b919b412188f6a5a6feb9b7808483baba9ace (diff) | |
parent | 9d7856620c5af8e1a5c3f81f921070728b6925d6 (diff) |
Merge pull request #16485 from poke1024/vector2-cross
Bring back Vector2.cross()
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/math_2d.cpp | 5 | ||||
-rw-r--r-- | core/math/math_2d.h | 1 |
2 files changed, 0 insertions, 6 deletions
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp index d2e4101999..3767d298a1 100644 --- a/core/math/math_2d.cpp +++ b/core/math/math_2d.cpp @@ -98,11 +98,6 @@ real_t Vector2::cross(const Vector2 &p_other) const { return x * p_other.y - y * p_other.x; } -Vector2 Vector2::cross(real_t p_other) const { - - return Vector2(p_other * y, -p_other * x); -} - Vector2 Vector2::floor() const { return Vector2(Math::floor(x), Math::floor(y)); diff --git a/core/math/math_2d.h b/core/math/math_2d.h index 8928349a44..02d921b67e 100644 --- a/core/math/math_2d.h +++ b/core/math/math_2d.h @@ -104,7 +104,6 @@ struct Vector2 { real_t dot(const Vector2 &p_other) const; real_t cross(const Vector2 &p_other) const; - Vector2 cross(real_t p_other) const; Vector2 project(const Vector2 &p_vec) const; Vector2 plane_project(real_t p_d, const Vector2 &p_vec) const; |