Skip to content

Commit

Permalink
fix: recursive depth calculation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yukiny0811 committed Aug 2, 2024
1 parent a6e28db commit c062760
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public extension GlyphUtil {
depth: Int,
line: inout [f2]
) {
if Self.DEPTH > 8 { return }
if depth > Self.DEPTH { return }
let startMiddleAngle: Float = acos(simd_dot(aVel, bVel))
let middleEndAngle: Float = acos(simd_dot(bVel, cVel))
if startMiddleAngle + middleEndAngle > angleLimit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public extension SVGUtil {
depth: Int,
line: inout [f2]
) {
if Self.DEPTH > 8 { return }
if depth > Self.DEPTH { return }
let startMiddleAngle: Float = acos(simd_dot(aVel, bVel))
let middleEndAngle: Float = acos(simd_dot(bVel, cVel))
if startMiddleAngle + middleEndAngle > angleLimit {
Expand Down

0 comments on commit c062760

Please sign in to comment.