Skip to content

Commit 83d887a

Browse files
committed
Changed distance calculation using distance method.
1 parent 7ac2a12 commit 83d887a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/mesh/modifier/InsetModifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private void insetFace(Mesh3D mesh, Face3D face, float thickness) {
3838
Vector3f v1 = mesh.vertices
3939
.get(face.indices[(i + 1) % face.indices.length]);
4040

41-
float distance = v1.subtract(v0).length();
41+
float distance = v0.distance(v1);
4242
float a = (1f / distance) * thickness;
4343

4444
Vector3f v4 = v1.subtract(v0).mult(a).add(v0);

0 commit comments

Comments
 (0)