Compare commits

...

3 Commits

Author SHA1 Message Date
Lukas Tenbrink 95aa0be56c
Merge f8280dff92 into 291147e21b 2024-10-16 14:07:34 +02:00
Lukas Tenbrink f8280dff92
Appease formatter 2024-09-26 15:06:46 +02:00
Lukas Tenbrink d586975dcf
Rename Vector4.components -> coords.
The use of .components is deprecated.
2024-09-26 15:04:06 +02:00
1 changed files with 4 additions and 3 deletions

View File

@ -55,16 +55,17 @@ struct _NO_DISCARD_ Vector4 {
real_t z;
real_t w;
};
real_t components[4] = { 0, 0, 0, 0 };
[[deprecated("Use coord instead")]] real_t components[4];
real_t coord[4] = { 0, 0, 0, 0 };
};
_FORCE_INLINE_ real_t &operator[](const int p_axis) {
DEV_ASSERT((unsigned int)p_axis < 4);
return components[p_axis];
return coord[p_axis];
}
_FORCE_INLINE_ const real_t &operator[](const int p_axis) const {
DEV_ASSERT((unsigned int)p_axis < 4);
return components[p_axis];
return coord[p_axis];
}
Vector4::Axis min_axis_index() const;