View Source Chip8.Interpreter.Display.Coordinates (chip8 v1.1.0)

Internal module used by Chip8.Interpreter.Display to make easier to manipulate the tuples representing the pixel coordinates.

The Coordinates value is a tuple containing two integer values. The first is the value of the x-axis (horizontal) and the second is the value of the y-axis (vertical).

Link to this section Summary

Link to this section Types

@type t() :: {x :: integer(), y :: integer()}

Link to this section Functions

@spec add(t(), t()) :: t()
Link to this function

from_ordinal(ordinal, max_y)

View Source
@spec from_ordinal(non_neg_integer(), pos_integer()) :: t()
Link to this macro

is_coordinates(coordinates)

View Source (macro)
@spec new(integer(), integer()) :: t()