Skip to content

Fix direction bugs in #addTriangular #2

@a6b8

Description

@a6b8

Three bugs in #addTriangular cause incorrect forward/switch direction data in tokenId:

  1. Sort comparator compares struct['order'] - struct['order'] (always NaN) instead of a['order'] - b['order']
  2. Case 1: acc[0] references full array instead of direction string acc[0][1], and arr[1] references currentPair instead of previous pair acc[0][0]
  3. Case 2: arr[2] references currentPair instead of first pair arr[0]

Triangle detection count is unaffected, but traversal direction metadata is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions