Antkeeper
0.0.1
|
n-dimensional line segment. More...
#include <line-segment.hpp>
Public Types | |
using | vector_type = math::vector< T, N > |
Vector type. More... | |
Public Member Functions | |
T | sqr_length () const noexcept |
Calculates the square length of the line segment. More... | |
T | length () const noexcept |
Calculates the length of the line segment. More... | |
T | sqr_distance (const vector_type &point) const noexcept |
Calculates the square distance from the line segment to a point. More... | |
T | distance (const vector_type &point) const |
Calculates the distance from the line segment to a point. More... | |
Public Attributes | |
vector_type | a |
First endpoint. More... | |
vector_type | b |
Second endpoint. More... | |
n-dimensional line segment.
T | Real type. |
N | Number of dimensions. |
Definition at line 35 of file line-segment.hpp.
using geom::primitives::line_segment< T, N >::vector_type = math::vector<T, N> |
Vector type.
Definition at line 38 of file line-segment.hpp.
|
inline |
Calculates the distance from the line segment to a point.
point | Input point. |
point
. Definition at line 101 of file line-segment.hpp.
|
inlinenoexcept |
Calculates the length of the line segment.
Definition at line 61 of file line-segment.hpp.
|
inlinenoexcept |
Calculates the square distance from the line segment to a point.
point | Input point. |
point
. Definition at line 74 of file line-segment.hpp.
|
inlinenoexcept |
Calculates the square length of the line segment.
Definition at line 51 of file line-segment.hpp.
vector_type geom::primitives::line_segment< T, N >::a |
First endpoint.
Definition at line 41 of file line-segment.hpp.
vector_type geom::primitives::line_segment< T, N >::b |
Second endpoint.
Definition at line 44 of file line-segment.hpp.