region: add minimal docstrings for some queries
This commit is contained in:
parent
c4a8ff3424
commit
0a599b4b14
11
region.hpp
11
region.hpp
@ -209,6 +209,8 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/// returns the squared minimum distance from a region to a given point
|
||||
template <size_t S, typename T>
|
||||
T
|
||||
distance2 (region<S,T> r, point<S,T> p)
|
||||
@ -222,6 +224,8 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
///------------------------------------------------------------------------
|
||||
/// returns the squared minimum distance from a region to a given point
|
||||
template <size_t S, typename T>
|
||||
T
|
||||
distance2 (point<S,T> p, region<S,T> r)
|
||||
@ -230,6 +234,9 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
/// returns true if the supplied point lies within the supplied region
|
||||
/// inclusive of borders.
|
||||
template <size_t S, typename T>
|
||||
bool
|
||||
intersects (util::region<S,T> const area,
|
||||
@ -257,7 +264,9 @@ namespace util {
|
||||
util::point<S,T>
|
||||
sample (region<S,T> shape, GeneratorT &&gen)
|
||||
{
|
||||
return shape.p + sample (shape.e, std::forward<GeneratorT> (gen)).template as<util::vector> ();
|
||||
return shape.p + sample (
|
||||
shape.e, std::forward<GeneratorT> (gen)
|
||||
).template as<util::vector> ();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user