From 9924d9ca897e9ab83251acc87486bd67143422b5 Mon Sep 17 00:00:00 2001 From: Michael Ahn Date: Thu, 15 Aug 2024 20:36:56 -0700 Subject: [PATCH] Fixed incorrect mesh face circumradius calculation - In 8e2f830, this was changed from `mju_norm3` to `mjuu_normvec`, but the latter will mutate its input to be normalized instead of just returning the norm (the former was likely mistaken as `mju_normalize3` which does mutate its input). --- src/user/user_mesh.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/user/user_mesh.cc b/src/user/user_mesh.cc index 6a637f40..22fc1ca6 100644 --- a/src/user/user_mesh.cc +++ b/src/user/user_mesh.cc @@ -1915,7 +1915,7 @@ void mjCMesh::MakeCenter(void) { // compute circumradius double norm_a_2 = mjuu_dot3(a, a); double norm_b_2 = mjuu_dot3(b, b); - double area = mjuu_normvec(nrm, 3); + double area = sqrt(mjuu_dot3(nrm, nrm)); // compute circumcenter double res[3], vec[3] = {