15 lines
282 B
C++
15 lines
282 B
C++
#include "Point.h"
|
|
|
|
class Rect {
|
|
public:
|
|
Point tl;
|
|
Point br;
|
|
Rect(Point tl_, Point br_): tl{tl_}, br{br_}{};
|
|
void move(Vector dist){
|
|
tl = tl + dist;
|
|
br = br + dist;
|
|
};
|
|
void scale(int scalar){
|
|
br = tl + (br - tl) * scalar;
|
|
}
|
|
}; |