Skip to content

Commit

Permalink
MathUtil squaredist (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
sooyoung-cha authored Dec 2, 2024
1 parent c2c3ad9 commit 9c102e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/commons/MathUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,13 @@ class MathUtil {
return sum;
}

static float squareDist(const float xx, const float xy, const float xz,
const float yx, const float yy, const float yz){
float d1 = xx - yx;
float d2 = xy - yy;
float d3 = xz - yz;
return (d1 * d1 + d2 * d2 + d3 * d3);
}

};

Expand Down

0 comments on commit 9c102e1

Please sign in to comment.