Isometric (stella v0.7.0)
Documentation for Isometric
.
Link to this section Summary
Functions
Projects 2D/3D carthesian coordinates to 2D isometric coordinates. The X axis goes from top-left to bottom-right. The Y axis goes from top-right to bottom-left. The Z axis goes straight up.
Convert string to point (2D or 3D)
Convert point to string
Convert string to point (2D or 3D)
Convert coorddinates to string
Convert coorddinates to string
Link to this section Functions
convert_cartesian_to_isometric(x, y, z \\ 0)
Projects 2D/3D carthesian coordinates to 2D isometric coordinates. The X axis goes from top-left to bottom-right. The Y axis goes from top-right to bottom-left. The Z axis goes straight up.
examples
Examples
iex> Isometric.convert_cartesian_to_isometric(1, 2)
%{x: -1, y: 1.5}
distance_between(point_a, point_b)
Convert string to point (2D or 3D)
examples
Examples
iex> Isometric.distance_between(%{x: -1, y: 2}, %{x: 1, y: 2})
2
iex> Isometric.distance_between(%{x: -91, y: -20}, %{x: -10, y: 2})
103
point_to_string(point)
@spec point_to_string(map()) :: <<_::64, _::_*8>>
Convert point to string
examples
Examples
iex> Isometric.point_to_string(%{x: 1, y: 2, z: 3})
"x: 1, y: 2, z: 3"
string_to_point(string)
Convert string to point (2D or 3D)
examples
Examples
iex> Isometric.string_to_point("x: 1, y: 2, z: 3")
%{x: 1, y: 2, z: 3}
to_string(x, y)
Convert coorddinates to string
examples
Examples
iex> Isometric.to_string(1, 2)
"x: 1, y: 2"
to_string(x, y, z)
Convert coorddinates to string
examples
Examples
iex> Isometric.to_string(1, 2, 3)
"x: 1, y: 2, z: 3"
iex> Isometric.to_string(1, 2, 3)
"x: 1, y: 2, z: 3"