Replace the custom mod function with Kotlin's built-in mod extension.

This commit is contained in:
Edwin Jakobs
2025-02-01 13:53:29 +01:00
parent b86f3a9d02
commit 426e35ebd0
4 changed files with 9 additions and 9 deletions

View File

@@ -137,8 +137,8 @@ fun extrudeShape(
val points = it
val normals = (points.indices).map { index ->
val a = mod(index + 1, points.size)
val b = mod(index - 1, points.size)
val a = (index + 1).mod(points.size)
val b = (index - 1).mod(points.size)
(points[a] - points[b]).safeNormalized * -flip
}
val forward = Vector3(0.0, 0.0, depth)