[util] Make a minor improvement to QuatMultVec

Switch from using addition to multiplication for doubling the value.

Also, fix lib/util/test Makemodule to actually work (too much c&p
coding).
This commit is contained in:
Bill Currie 2020-12-14 13:36:28 +09:00
parent 4a8818f0b6
commit e991c44232
2 changed files with 4 additions and 3 deletions

View file

@ -268,7 +268,7 @@ QuatMultVec (const quat_t q, const vec3_t v, vec3_t out)
dqq = DotProduct (q, q);
VectorScale (tv, s, tv);
VectorMultAdd (tv, dqv, q, tv);
VectorAdd (tv, tv, tv);
VectorScale (tv, 2, tv);
VectorMultAdd (tv, s * s - dqq, v, out);
}

View file

@ -14,9 +14,10 @@ libs_util_tests = \
libs/util/test/test-set \
libs/util/test/test-txtbuffer \
libs/util/test/test-vrect
check_PROGRAMS += $(libs_util_tests)
TESTS += $(libs_model_tests)
TESTS += $(libs_util_tests)
check_PROGRAMS += $(libs_util_tests)
libs_util_test_test_bary_SOURCES=libs/util/test/test-bary.c
libs_util_test_test_bary_LDADD=libs/util/libQFutil.la