Quadtreex.BoundingBox (quadtreex v0.2.1) View Source

Describes a box of 2 dimensional space

Link to this section Summary

Link to this section Types

Specs

coordinate() :: {number(), number()}

Specs

quadrant() :: :ne | :se | :sw | :nw

Specs

t() :: %Quadtreex.BoundingBox{
  center: {float(), float()},
  height: number(),
  l: coordinate(),
  r: coordinate(),
  width: number()
}

Link to this section Functions

Link to this function

contains?(bounding_box, arg2)

View Source

Specs

contains?(t(), coordinate()) :: boolean()
Link to this function

distance_between(arg1, arg2)

View Source
Link to this function

distance_from(arg1, arg2, point \\ :l)

View Source
Link to this function

find_quadrant(bounding_box, arg2)

View Source

Specs

find_quadrant(t(), coordinate()) :: {:ok, quadrant()} | {:error, :out_of_bounds}
Link to this function

for_quadrant(bounding_box, quadrant)

View Source

Specs

for_quadrant(t(), quadrant()) :: t()

Specs

new(coordinate(), coordinate()) :: t()

Specs

new(number(), number(), number(), number()) :: t()