Преглед на файлове

libobs: Return target vec not current when within EPSILON

If current vector is within EPSILON, it would return the current,
when logically the target should be returned instead.
tt2468 преди 4 години
родител
ревизия
7b2b723270
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      libobs/graphics/math-extra.c

+ 1 - 1
libobs/graphics/math-extra.c

@@ -101,7 +101,7 @@ void calc_torque(struct vec3 *dst, const struct vec3 *v1, const struct vec3 *v2,
 	float orig_dist, torque_dist, adjust_dist;
 
 	if (vec3_close(v1, v2, EPSILON)) {
-		vec3_copy(dst, v1);
+		vec3_copy(dst, v2);
 		return;
 	}