Scenic.Math.Line.trunc

You're seeing just the function trunc, go back to Scenic.Math.Line module for more information.

Specs

trunc(line :: Scenic.Math.line()) :: Scenic.Math.line()

Truncate the points that define a line so that they are made up of integers.

Parameters:

  • line - A line defined by two points. {point_a, point_b}

Returns:

A line

Examples

iex> Scenic.Math.Line.trunc({{1.1, 1.1}, {2.0, 2.0}})
{{1, 1}, {2, 2}}
iex> Scenic.Math.Line.trunc({{-1, 1}, {-2.0, 2.0}})
{{-1, 1}, {-2, 2}}