BLI_utildefines: add SQUARE macro

also minor cleanup
This commit is contained in:
2014-10-13 15:35:41 +02:00
parent cc03689962
commit a4258d40a1
7 changed files with 11 additions and 8 deletions

View File

@@ -249,7 +249,7 @@ static void set_prop_dist(TransInfo *t, const bool with_dist)
}
dist_sq = len_squared_v3(vec);
if ((tob->rdist == -1.0f) || (dist_sq < (tob->rdist * tob->rdist))) {
if ((tob->rdist == -1.0f) || (dist_sq < SQUARE(tob->rdist))) {
tob->rdist = sqrtf(dist_sq);
}
}