1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

vector4 distance_squared_to and update csharp

This commit is contained in:
antonWetzel
2022-08-08 17:05:55 +02:00
parent 7355dfb502
commit 40a1d6d100
6 changed files with 125 additions and 6 deletions

View File

@@ -91,6 +91,10 @@ real_t Vector4::distance_to(const Vector4 &p_to) const {
return (p_to - *this).length();
}
real_t Vector4::distance_squared_to(const Vector4 &p_to) const {
return (p_to - *this).length_squared();
}
Vector4 Vector4::direction_to(const Vector4 &p_to) const {
Vector4 ret(p_to.x - x, p_to.y - y, p_to.z - z, p_to.w - w);
ret.normalize();