new widgets

This commit is contained in:
IlyaShurupov 2024-06-19 22:17:18 +03:00 committed by Ilya Shurupov
parent 5cc982fa00
commit 285ca80b4b
18 changed files with 373 additions and 43 deletions

View file

@ -159,6 +159,10 @@ namespace tp {
size = p3 - pos;
}
Rect<Type> shrink(Type val) const {
return { pos + val, size - val * 2 };
}
// if only one point isInside
bool clampOutside(Vec2<Type>& v1, Vec2<Type>& v2) {
bool const in1 = isInside(v1);