Template Function navtk::utils::trapezoidal_area
Defined in File algorithm.hpp
Function Documentation
-
template<typename X, typename Y>
Y navtk::utils::trapezoidal_area(X x0, const Y &y0, X x1, const Y &y1) Calculate the area of a right trapezoid.
- Parameters
x0 – The value that gives the lower x bound of the trapezoid.
y0 – The value that gives the lower y bound of the trapezoid.
x1 – The value that gives the upper x bound of the trapezoid.
y1 – The value that gives the upper y bound of the trapezoid.
- Returns
Area of the trapezoid formed by the points (
x0,y0), (x0,0), (x1,y1), (x1,0).