1
0
Fork 0
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:
Brian Fiete 2025-03-28 08:08:33 -04:00
parent 81a9478e77
commit fe1aa3c26e
32 changed files with 282 additions and 120 deletions

View file

@ -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;