raze-gles/source/common/utility/floatrect.h

42 lines
498 B
C
Raw Normal View History

2020-04-19 19:46:37 +00:00
#pragma once
struct FloatRect
{
float left,top;
float width,height;
void Offset(float xofs,float yofs)
{
left+=xofs;
top+=yofs;
}
void Scale(float xfac,float yfac)
{
left*=xfac;
width*=xfac;
top*=yfac;
height*=yfac;
}
};
2020-06-07 13:02:54 +00:00
struct DoubleRect
{
double left, top;
double width, height;
void Offset(double xofs, double yofs)
{
left += xofs;
top += yofs;
}
void Scale(double xfac, double yfac)
{
left *= xfac;
width *= xfac;
top *= yfac;
height *= yfac;
}
};