• Convert a loction to a index to reduce need for 2D arrays

    Parameters

    • __namedParameters: Location
    • width: number

      width of the canvas

    Returns number