Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPowerOfTwo ¶ added in v1.2.0
IsPowerOfTwo return true when the given integer is a power of two. See https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2 for details.
func NewMetatileReader ¶
Types ¶
type TileCoord ¶
func (TileCoord) MetaAndOffset ¶
MetaAndOffset returns the metatile coordinate and the offset within it for this TileCoord object. The argument metaSize indicates the size of the metatile and tileSize indicates the size of the tile within the metatile that you want to extract, both in units of "standard" 256px tiles.
For example, to extract a 1x1 regular 256px tile from a 2x2 metatile, one would call MetaAndOffset(2, 1). To extract the 512px tile from the same, call MetaAndOffset(2, 2).
Click to show internal directories.
Click to hide internal directories.