region: add minimal docstrings for some queries

This commit is contained in:
Danny Robson 2018-06-07 15:20:37 +10:00
parent c4a8ff3424
commit 0a599b4b14

View File

@ -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> ();
}