diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/math/bvh_abb.h | 8 | ||||
-rw-r--r-- | core/math/vector2.h | 4 | ||||
-rw-r--r-- | core/math/vector3.h | 4 | ||||
-rw-r--r-- | core/math/vector4.h | 6 |
4 files changed, 6 insertions, 16 deletions
diff --git a/core/math/bvh_abb.h b/core/math/bvh_abb.h index 8a44f1c4da..699f7de604 100644 --- a/core/math/bvh_abb.h +++ b/core/math/bvh_abb.h @@ -251,7 +251,9 @@ struct BVH_ABB { void expand(real_t p_change) { POINT change; - change.set_all(p_change); + for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) { + change[axis] = p_change; + } grow(change); } @@ -262,7 +264,9 @@ struct BVH_ABB { } void set_to_max_opposite_extents() { - neg_max.set_all(FLT_MAX); + for (int axis = 0; axis < POINT::AXIS_COUNT; ++axis) { + neg_max[axis] = FLT_MAX; + } min = neg_max; } diff --git a/core/math/vector2.h b/core/math/vector2.h index 9441f84087..75364f72f0 100644 --- a/core/math/vector2.h +++ b/core/math/vector2.h @@ -69,10 +69,6 @@ struct _NO_DISCARD_ Vector2 { return coord[p_idx]; } - _FORCE_INLINE_ void set_all(const real_t p_value) { - x = y = p_value; - } - _FORCE_INLINE_ Vector2::Axis min_axis_index() const { return x < y ? Vector2::AXIS_X : Vector2::AXIS_Y; } diff --git a/core/math/vector3.h b/core/math/vector3.h index cde7cb2993..62e810fb4d 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -68,10 +68,6 @@ struct _NO_DISCARD_ Vector3 { return coord[p_axis]; } - _FORCE_INLINE_ void set_all(const real_t p_value) { - x = y = z = p_value; - } - _FORCE_INLINE_ Vector3::Axis min_axis_index() const { return x < y ? (x < z ? Vector3::AXIS_X : Vector3::AXIS_Z) : (y < z ? Vector3::AXIS_Y : Vector3::AXIS_Z); } diff --git a/core/math/vector4.h b/core/math/vector4.h index 224b477bf3..b3ddff3f22 100644 --- a/core/math/vector4.h +++ b/core/math/vector4.h @@ -63,8 +63,6 @@ struct _NO_DISCARD_ Vector4 { return components[p_axis]; } - _FORCE_INLINE_ void set_all(const real_t p_value); - Vector4::Axis min_axis_index() const; Vector4::Axis max_axis_index() const; @@ -145,10 +143,6 @@ struct _NO_DISCARD_ Vector4 { } }; -void Vector4::set_all(const real_t p_value) { - x = y = z = p_value; -} - real_t Vector4::dot(const Vector4 &p_vec4) const { return x * p_vec4.x + y * p_vec4.y + z * p_vec4.z + w * p_vec4.w; } |