Browse Source

Merge pull request #191 from clayjohn/nativescript-1.1

Fix Vector3.distance_to
Thomas Herzog 6 năm trước cách đây
mục cha
commit
3a64f81cb7
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/core/Vector3.cpp

+ 2 - 2
src/core/Vector3.cpp

@@ -229,12 +229,12 @@ real_t Vector3::length_squared() const
 
 real_t Vector3::distance_squared_to(const Vector3& b) const
 {
-	return (b-*this).length();
+	return (b-*this).length_squared();
 }
 
 real_t Vector3::distance_to(const Vector3& b) const
 {
-	return (b-*this).length_squared();
+	return (b-*this).length();
 }
 
 real_t Vector3::dot(const Vector3& b) const