PIRect complete

This commit is contained in:
Andrey
2022-03-21 10:35:34 +03:00
parent 2596b119ac
commit 3dd0d0b6cf
7 changed files with 160 additions and 57 deletions

View File

@@ -38,11 +38,25 @@ template<typename Type>
class PIP_EXPORT PILine {
static_assert(std::is_arithmetic<Type>::value, "Type must be arithmetic");
public:
PIPoint p0;
PIPoint p1;
PIPoint<Type> p0;
PIPoint<Type> p1;
PILine() {}
PILine(const PIPoint<Type> & p0_, const PIPoint<Type> & p1_) {
p0 = p0_;
p1 = p1_;
}
bool isEmpty() const {
return (p0 == p1);
}
};
typedef PILine<int> PILinei;
typedef PILine<uint> PILineu;
typedef PILine<float> PILinef;
typedef PILine<double> PILined;
#endif // PILINE_H