diff --git a/doomsday/libdeng1/include/de/vector1.h b/doomsday/libdeng1/include/de/vector1.h index e0ca70ffba..f5e33134bf 100644 --- a/doomsday/libdeng1/include/de/vector1.h +++ b/doomsday/libdeng1/include/de/vector1.h @@ -332,8 +332,10 @@ DENG_PUBLIC void V2d_Lerp(pvec2d_t dest, const_pvec2d_t a, const_pvec2d_t b, dou * Left/top is the min-point. Right/bottom is the max-point. */ DENG_PUBLIC void V2d_InitBox(arvec2d_t box, const_pvec2d_t point); +DENG_PUBLIC void V2d_InitBoxXY(arvec2d_t box, double x, double y); DENG_PUBLIC void V2d_AddToBox(arvec2d_t box, const_pvec2d_t point); +DENG_PUBLIC void V2d_AddToBoxXY(arvec2d_t box, double x, double y); DENG_PUBLIC void V2d_UniteBox(arvec2d_t box, const_arvec2d_t other); diff --git a/doomsday/libdeng1/src/vector1.c b/doomsday/libdeng1/src/vector1.c index a34b4eef7b..8103fb1874 100644 --- a/doomsday/libdeng1/src/vector1.c +++ b/doomsday/libdeng1/src/vector1.c @@ -627,6 +627,12 @@ void V2d_InitBox(arvec2d_t box, const_pvec2d_t point) V2d_Copy(box[1], point); } +void V2d_InitBoxXY(arvec2d_t box, double x, double y) +{ + vec2d_t point; V2d_Set(point, x, y); + V2d_InitBox(box, point); +} + void V2d_AddToBox(arvec2d_t box, const_pvec2d_t point) { if(point[VX] < box[0][VX]) @@ -640,6 +646,12 @@ void V2d_AddToBox(arvec2d_t box, const_pvec2d_t point) box[1][VY] = point[VY]; } +void V2d_AddToBoxXY(arvec2d_t box, double x, double y) +{ + vec2d_t point; V2d_Set(point, x, y); + V2d_AddToBox(box, point); +} + void V2d_UniteBox(arvec2d_t box, const_arvec2d_t other) { if(other[0][VX] < box[0][VX])