|
@@ -241,7 +241,7 @@ real_t Vector3::distance_squared_to(const Vector3 &p_b) const {
|
|
}
|
|
}
|
|
|
|
|
|
Vector3 Vector3::project(const Vector3 &p_b) const {
|
|
Vector3 Vector3::project(const Vector3 &p_b) const {
|
|
- return p_b * (dot(p_b) / p_b.dot(p_b));
|
|
|
|
|
|
+ return p_b * (dot(p_b) / p_b.length_squared());
|
|
}
|
|
}
|
|
|
|
|
|
real_t Vector3::angle_to(const Vector3 &p_b) const {
|
|
real_t Vector3::angle_to(const Vector3 &p_b) const {
|