hexCornerOffset

fun hexCornerOffset(layout: Layout, corner: Int): Point(source)

Calculates the offset of a corner of a hexagon. This is done by first calculating the angle of the corner relative to the layout's start angle, then scaling a unit vector at that angle by the layout's size.

Return

The offset of the corner.

Parameters

layout

The layout of the hexagonal grid.

corner

The index of the corner (0-5).