merge curvature stuff into this

This commit is contained in:
2021-11-12 17:08:19 +01:00
parent d51945ecaf
commit d01ba47b65
19 changed files with 672 additions and 129 deletions

View File

@ -65,4 +65,12 @@ qreal triangle_area(Point p1, Point p2, Point p3) {
qreal cotan(const qreal x);
#endif
template <typename T>
constexpr const T& clamp(const T& v, const T& lo, const T& hi) {
if (v < lo) return lo;
if (v > hi) return hi;
return v;
}
#endif