parent
72925adaca
commit
3a486311ca
2 changed files with 13 additions and 13 deletions
|
|
@ -103,6 +103,17 @@ void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *Line, vector3_t
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// P_PointOnLineSide
|
||||
// Returns 0 or 1
|
||||
//
|
||||
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - line->v1->y) * line->dx - ((INT64)x - line->v1->x) * line->dy;
|
||||
return v > 0;
|
||||
}
|
||||
|
||||
//
|
||||
// P_BoxOnLineSide
|
||||
// Considers the line to be infinite
|
||||
|
|
@ -140,7 +151,7 @@ INT32 P_BoxOnLineSide(const fixed_t *tmbox, const line_t *ld)
|
|||
// P_PointOnDivlineSide
|
||||
// Returns 0 or 1.
|
||||
//
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
|
||||
static INT32 P_PointOnDivlineSide(fixed_t x, fixed_t y, const divline_t *line)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - line->y) * line->dx - ((INT64)x - line->x) * line->dy;
|
||||
|
|
|
|||
|
|
@ -48,18 +48,7 @@ boolean P_PathTraverse(fixed_t px1, fixed_t py1, fixed_t px2, fixed_t py2,
|
|||
#define P_AproxDistance(dx, dy) FixedHypot(dx, dy)
|
||||
void P_ClosestPointOnLine(fixed_t x, fixed_t y, const line_t *line, vertex_t *result);
|
||||
void P_ClosestPointOnLine3D(const vector3_t *p, const vector3_t *line, vector3_t *result);
|
||||
|
||||
//
|
||||
// P_PointOnLineSide
|
||||
// Returns 0 or 1
|
||||
//
|
||||
FUNCMATH FUNCINLINE static ATTRINLINE INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line)
|
||||
{
|
||||
// use cross product to determine side quickly
|
||||
INT64 v = ((INT64)y - line->v1->y) * line->dx - ((INT64)x - line->v1->x) * line->dy;
|
||||
return v > 0;
|
||||
}
|
||||
|
||||
INT32 P_PointOnLineSide(fixed_t x, fixed_t y, const line_t *line);
|
||||
void P_MakeDivline(const line_t *li, divline_t *dl);
|
||||
|
||||
struct opening_t
|
||||
|
|
|
|||
Loading…
Reference in a new issue