stella v0.4.0 Cartesian
Documentation for Cartesian
.
Link to this section Summary
Functions
Determine in which quadrant at two dimensional Cartesian plane point are.
Determine in which quadrant at two dimensional Cartesian plane point are.
Order points by distance between them. Returns 1 if A is nearer thatn B, else returns -1
Order points looking by x parametr value. Returns 1 if A is nearer thatn B, else returns -1
Order points looking by y parametr value. Returns 1 if A is nearer thatn B, else returns -1
Order points looking by z parametr value. Returns 1 if A is nearer thatn B, else returns -1
Calculates the proximity to the nearest point. More info here
Link to this section Functions
determine_octan(point)
Determine in which quadrant at two dimensional Cartesian plane point are.
Examples
iex> Cartesian.determine_octan(%{x: 1, y: 2, z: 3})
0
iex> Cartesian.determine_octan(%{x: 0, y: 0, z: 3})
nil
determine_quadrant(point)
Determine in which quadrant at two dimensional Cartesian plane point are.
Examples
iex> Cartesian.determine_quadrant(%{x: 1, y: 2})
1
iex> Cartesian.determine_quadrant(%{x: 0, y: 0})
nil
order_by_distance(point_a, point_b)
Order points by distance between them. Returns 1 if A is nearer thatn B, else returns -1
Examples
iex> Cartesian.order_by_distance(%{x: 1, y: 2, z: 3}, %{x: 2, y: 2, z: 3})
-1
order_by_x(point_a, point_b)
Order points looking by x parametr value. Returns 1 if A is nearer thatn B, else returns -1
Examples
iex> Cartesian.order_by_x(%{x: 1, y: 2, z: 3}, %{x: 2, y: 2, z: 3})
-1
order_by_y(point_a, point_b)
Order points looking by y parametr value. Returns 1 if A is nearer thatn B, else returns -1
Examples
iex> Cartesian.order_by_y(%{x: 1, y: 2, z: 3}, %{x: 2, y: 2, z: 3})
1
order_by_z(point_a, point_b)
Order points looking by z parametr value. Returns 1 if A is nearer thatn B, else returns -1
Examples
iex> Cartesian.order_by_z(%{x: 1, y: 2, z: 3}, %{x: 2, y: 2, z: 3})
1
proximity(point)
Calculates the proximity to the nearest point. More info here
Examples
iex> Cartesian.proximity(%{x: 1, y: 2, z: 3})
6