dont trust user to zero out return value
function accumulates values to calculate volume. vol needs to be zero before using +=
This commit is contained in:
1 parent
9dceba97f5
commit
1c2b06dc94
1 file changed
+1
@@ -2424,6 +2424,7 @@ rt_arb_volume(fastf_t *vol, const struct rt_db_internal *ip)
|
||||
tmp_tol.dist = RT_LEN_TOL;
|
||||
tmp_tol.dist_sq = tmp_tol.dist * tmp_tol.dist;
|
||||
|
||||
*vol = 0.0;
|
||||
for (i = 0; i < 6; i++) {
|
||||
/* a, b, c = base of the arb4 */
|
||||
a = farb4[i][0];
|
||||
|
||||
Reference in new issue
Block a user