matrix-dom
    Preparing search index...

    Function randomStart

    • Generate a random starting point for a line with the provided length and direction.

      Parameters

      • matrix: Matrix

        The matrix in which the line will be drawn.

      • length: number | null = null

        The intended length (intersected tiles) of the resulting line, null will use a random length within the matrix

      • dir: Direction | null = null

        The direction the line will extend towards, null will use a random direction within the matrix

      • maxRanges: Point | null = null

        The maximum ranges for the point. If null, the matrix will be used.

      Returns Point