[wpimath] Make geometry classes constexpr (#7222)

This commit is contained in:
Tyler Veness
2024-10-18 16:08:41 -07:00
committed by GitHub
parent 2054d0f57e
commit 95b9bd880b
30 changed files with 1324 additions and 1114 deletions

View File

@@ -153,7 +153,9 @@ class WPILIB_DLLEXPORT Ellipse2d {
* @param point The point to check.
* @return The distance (0, if the point is contained by the ellipse)
*/
units::meter_t Distance(const Translation2d& point) const;
units::meter_t Distance(const Translation2d& point) const {
return FindNearestPoint(point).Distance(point);
}
/**
* Returns the nearest point that is contained within the ellipse.