MikkTSpace icon indicating copy to clipboard operation
MikkTSpace copied to clipboard

Off by one errors sorting edges

Open siler opened this issue 1 year ago • 0 comments

Hello,

I noticed that there seems to be a couple of off by one errors in the edge sorting code. The condition checks here and here need to be <= as opposed to <. It seems that the last element of the edges array is not being sorted into the proper position without this change.

An example array tail before the change:

[ ...
  unnamed { i0: 84, i1: 94, f: 21 }
  unnamed { i0: 89, i1: 94, f: 23 }
  unnamed { i0: 89, i1: 94, f: 22 }
]

Thank you.

siler avatar Jan 28 '24 04:01 siler