circle

fun circle(originQ: Int = 0, originR: Int = 0, radius: Int, callback: (Int, Int) -> Unit)(source)

Calls the provided callback on each point within a hexagonal area defined by provided origin and radius.

Parameters

originQ

The 'q' coordinate of the origin point. Default is 0.

originR

The 'r' coordinate of the origin point. Default is 0.

radius

The radius of the hexagonal area to loop over.

callback

A function to call on each point within the defined area.


Generates a list of coordinates forming a circular region at this coordinate with a given radius.

Return

A list of coordinates within the circular region.

Parameters

radius

The radius of the circular region.

See also