diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-06 14:01:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 14:01:45 +0100 |
commit | 5baf20e638a7a5ca140208f961c0b65a61c33734 (patch) | |
tree | a7596e98ea273c11e27a0422df036dd2dfd42df3 /core/math/vector3i.cpp | |
parent | 608c9f820349ca13f017ea406c790d90729da837 (diff) | |
parent | 24f57886d087d78eb8dcf7be28d790cddadf2c99 (diff) | |
download | redot-engine-5baf20e638a7a5ca140208f961c0b65a61c33734.tar.gz |
Merge pull request #34005 from aaronfranke/minmax
Diffstat (limited to 'core/math/vector3i.cpp')
-rw-r--r-- | core/math/vector3i.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/vector3i.cpp b/core/math/vector3i.cpp index d3a57af77c..7812a0b41c 100644 --- a/core/math/vector3i.cpp +++ b/core/math/vector3i.cpp @@ -40,12 +40,12 @@ int32_t Vector3i::get_axis(const int p_axis) const { return operator[](p_axis); } -int Vector3i::min_axis() const { - return x < y ? (x < z ? 0 : 2) : (y < z ? 1 : 2); +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); } -int Vector3i::max_axis() const { - return x < y ? (y < z ? 2 : 1) : (x < z ? 2 : 0); +Vector3i::Axis Vector3i::max_axis_index() const { + return x < y ? (y < z ? Vector3i::AXIS_Z : Vector3i::AXIS_Y) : (x < z ? Vector3i::AXIS_Z : Vector3i::AXIS_X); } Vector3i Vector3i::clamp(const Vector3i &p_min, const Vector3i &p_max) const { |