vector3:return w1 not zero vector
This commit is contained in:
parent
29c2c40c41
commit
4513546845
@ -509,7 +509,7 @@ Vector3<T> Vector3<T>::point_on_line_closest_to_other_point(const Vector3<T> &w1
|
||||
const T line_vec_len = line_vec.length();
|
||||
// protection against divide by zero
|
||||
if(::is_zero(line_vec_len)) {
|
||||
return {0.0f, 0.0f, 0.0f};
|
||||
return w1;
|
||||
}
|
||||
|
||||
const T scale = 1/line_vec_len;
|
||||
|
Loading…
Reference in New Issue
Block a user