mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
BeefySysLib point/rect updates, async pipe fixes
This commit is contained in:
parent
81a9478e77
commit
fe1aa3c26e
32 changed files with 282 additions and 120 deletions
|
@ -4,18 +4,33 @@
|
|||
|
||||
NS_BF_BEGIN;
|
||||
|
||||
class Point2D
|
||||
template <typename T>
|
||||
class Point
|
||||
{
|
||||
public:
|
||||
float mX;
|
||||
float mY;
|
||||
T x;
|
||||
T y;
|
||||
|
||||
public:
|
||||
Point2D(float x = 0, float y = 0)
|
||||
Point(T x = 0, T y = 0)
|
||||
{
|
||||
mX = x;
|
||||
mY = y;
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
}
|
||||
|
||||
Point operator+(Point rhs)
|
||||
{
|
||||
return Point(x + rhs.x, y + rhs.y);
|
||||
}
|
||||
|
||||
Point operator-(Point rhs)
|
||||
{
|
||||
return Point(x - rhs.x, y - rhs.y);
|
||||
}
|
||||
};
|
||||
|
||||
typedef Point<double> PointD;
|
||||
typedef Point<float> PointF;
|
||||
typedef Point<int32> PointI32;
|
||||
|
||||
NS_BF_END;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue