Author Topic: CellGetNeighbours use Cached Indeces Array for performance like CellGetFromGroup  (Read 231 times)

manofspirit

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Hi there,

CellGetFromGroup takes indeces array for optimization which is great
int CellGetFromGroup (int group, int[] indices)

Please provide a similar method for CellGetNeighbours that takes int[] indices array instead returning a new List every call.

Thanks

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5137
    • View Profile
Added overloads to CellGetNeighbour to accept List<int> parameters.

manofspirit

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Thank you for adding this to recent beta however there is a minor conflict
CellGetFromGroup uses int[] while CellNeighbours is using List<int>

So it'd be great if we use same code cached indeces for both whether List or array so we can reuse same datatype for both.

Thanks

Kronnect

  • Administrator
  • Hero Member
  • *****
  • Posts: 5137
    • View Profile
Done. A new overload for CellGetFromGroup has been added which uses a List<int> as well.

manofspirit

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Done. A new overload for CellGetFromGroup has been added which uses a List<int> as well.

Awesome :)