testobuild/shapes.h
MassiveAtoms 45993b5e53 sample
2020-04-17 12:27:05 -03:00

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