Merge pull request #191 from clayjohn/nativescript-1.1

Fix Vector3.distance_to
nativescript-1.1
Thomas Herzog 2018-10-26 08:51:08 +02:00 committed by GitHub
commit 3a64f81cb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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