GamesEngine.Grid.Coordinate (games_engine v0.1.0)

Functions for handling coordinate transformations and translations

Summary

Functions

Converts a coordinate's linear index to row/col subscript

Types

@type t() :: %GamesEngine.Grid.Coordinate{col: term(), row: term()}

Functions

Link to this function

ind_2_sub(ind, arg)

@spec ind_2_sub(
  non_neg_integer(),
  {non_neg_integer(), non_neg_integer()}
) :: t()

Converts a coordinate's linear index to row/col subscript

0360,00,10,2
147-->1,01,11,2
2582,02,12,2