Spectacular Cellular Automata
    Preparing search index...

    Function posToIndex

    • Convert 2D position to 1D array index.

      Parameters

      • x: number
      • y: number
      • w: number

        Cell Grid width

      • h: number

        Cell Grid height

      Returns number