summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-09-19 12:49:18 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-09-19 15:08:50 -0500
commitfd8bd276579faa02f678c3ff61a5ef8da615bfcd (patch)
tree1de061f5df5bd1a1468726cfa0afc8c436026bd3 /core
parentbcf754d735249a779469839455d925cf42b48057 (diff)
Remove set_axis and get_axis methods from Vector2/2i/3/3i/4/4i
Diffstat (limited to 'core')
-rw-r--r--core/math/vector3.cpp10
-rw-r--r--core/math/vector3.h3
-rw-r--r--core/math/vector3i.cpp10
-rw-r--r--core/math/vector3i.h3
-rw-r--r--core/math/vector4.cpp10
-rw-r--r--core/math/vector4.h3
-rw-r--r--core/math/vector4i.cpp10
-rw-r--r--core/math/vector4i.h3
8 files changed, 0 insertions, 52 deletions
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index 4db45fe798..55ba509144 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -45,16 +45,6 @@ Vector3 Vector3::rotated(const Vector3 &p_axis, const real_t p_angle) const {
return r;
}
-void Vector3::set_axis(const int p_axis, const real_t p_value) {
- ERR_FAIL_INDEX(p_axis, 3);
- coord[p_axis] = p_value;
-}
-
-real_t Vector3::get_axis(const int p_axis) const {
- ERR_FAIL_INDEX_V(p_axis, 3, 0);
- return operator[](p_axis);
-}
-
Vector3 Vector3::clamp(const Vector3 &p_min, const Vector3 &p_max) const {
return Vector3(
CLAMP(x, p_min.x, p_max.x),
diff --git a/core/math/vector3.h b/core/math/vector3.h
index 3944afa92e..cde7cb2993 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -68,9 +68,6 @@ struct _NO_DISCARD_ Vector3 {
return coord[p_axis];
}
- void set_axis(const int p_axis, const real_t p_value);
- real_t get_axis(const int p_axis) const;
-
_FORCE_INLINE_ void set_all(const real_t p_value) {
x = y = z = p_value;
}
diff --git a/core/math/vector3i.cpp b/core/math/vector3i.cpp
index b8e74ea6d2..b248f35035 100644
--- a/core/math/vector3i.cpp
+++ b/core/math/vector3i.cpp
@@ -33,16 +33,6 @@
#include "core/math/vector3.h"
#include "core/string/ustring.h"
-void Vector3i::set_axis(const int p_axis, const int32_t p_value) {
- ERR_FAIL_INDEX(p_axis, 3);
- coord[p_axis] = p_value;
-}
-
-int32_t Vector3i::get_axis(const int p_axis) const {
- ERR_FAIL_INDEX_V(p_axis, 3, 0);
- return operator[](p_axis);
-}
-
Vector3i::Axis Vector3i::min_axis_index() const {
return x < y ? (x < z ? Vector3i::AXIS_X : Vector3i::AXIS_Z) : (y < z ? Vector3i::AXIS_Y : Vector3i::AXIS_Z);
}
diff --git a/core/math/vector3i.h b/core/math/vector3i.h
index 825ce40318..5a62ff044b 100644
--- a/core/math/vector3i.h
+++ b/core/math/vector3i.h
@@ -64,9 +64,6 @@ struct _NO_DISCARD_ Vector3i {
return coord[p_axis];
}
- void set_axis(const int p_axis, const int32_t p_value);
- int32_t get_axis(const int p_axis) const;
-
Vector3i::Axis min_axis_index() const;
Vector3i::Axis max_axis_index() const;
diff --git a/core/math/vector4.cpp b/core/math/vector4.cpp
index 3c25f454a3..55e51834df 100644
--- a/core/math/vector4.cpp
+++ b/core/math/vector4.cpp
@@ -33,16 +33,6 @@
#include "core/math/basis.h"
#include "core/string/print_string.h"
-void Vector4::set_axis(const int p_axis, const real_t p_value) {
- ERR_FAIL_INDEX(p_axis, 4);
- components[p_axis] = p_value;
-}
-
-real_t Vector4::get_axis(const int p_axis) const {
- ERR_FAIL_INDEX_V(p_axis, 4, 0);
- return operator[](p_axis);
-}
-
Vector4::Axis Vector4::min_axis_index() const {
uint32_t min_index = 0;
real_t min_value = x;
diff --git a/core/math/vector4.h b/core/math/vector4.h
index f964264108..224b477bf3 100644
--- a/core/math/vector4.h
+++ b/core/math/vector4.h
@@ -65,9 +65,6 @@ struct _NO_DISCARD_ Vector4 {
_FORCE_INLINE_ void set_all(const real_t p_value);
- void set_axis(const int p_axis, const real_t p_value);
- real_t get_axis(const int p_axis) const;
-
Vector4::Axis min_axis_index() const;
Vector4::Axis max_axis_index() const;
diff --git a/core/math/vector4i.cpp b/core/math/vector4i.cpp
index a89b802675..77f6fbd5b7 100644
--- a/core/math/vector4i.cpp
+++ b/core/math/vector4i.cpp
@@ -33,16 +33,6 @@
#include "core/math/vector4.h"
#include "core/string/ustring.h"
-void Vector4i::set_axis(const int p_axis, const int32_t p_value) {
- ERR_FAIL_INDEX(p_axis, 4);
- coord[p_axis] = p_value;
-}
-
-int32_t Vector4i::get_axis(const int p_axis) const {
- ERR_FAIL_INDEX_V(p_axis, 4, 0);
- return operator[](p_axis);
-}
-
Vector4i::Axis Vector4i::min_axis_index() const {
uint32_t min_index = 0;
int32_t min_value = x;
diff --git a/core/math/vector4i.h b/core/math/vector4i.h
index d08e40d754..86ac8fd581 100644
--- a/core/math/vector4i.h
+++ b/core/math/vector4i.h
@@ -66,9 +66,6 @@ struct _NO_DISCARD_ Vector4i {
return coord[p_axis];
}
- void set_axis(const int p_axis, const int32_t p_value);
- int32_t get_axis(const int p_axis) const;
-
Vector4i::Axis min_axis_index() const;
Vector4i::Axis max_axis_index() const;