- walltype::fdelta

This commit is contained in:
Christoph Oelckers 2022-08-17 22:30:25 +02:00
parent 91f305125e
commit 0a3bd7a3a3
2 changed files with 2 additions and 3 deletions

View file

@ -460,9 +460,7 @@ inline int I_GetBuildTime()
inline int32_t getangle(walltype* wal)
{
return getangle(
wal->point2Wall()->wall_int_pos().X - wal->wall_int_pos().X,
wal->point2Wall()->wall_int_pos().Y - wal->wall_int_pos().Y);
return getangle(wal->fdelta());
}
inline TArrayView<walltype> wallsofsector(const sectortype* sec)

View file

@ -428,6 +428,7 @@ struct walltype
walltype* lastWall(bool fast = true) const;
walltype* point2Wall() const;
vec2_t delta() const { return point2Wall()->wall_int_pos() - wall_int_pos(); }
DVector2 fdelta() const { return point2Wall()->pos - pos; }
vec2_t center() const { return(point2Wall()->wall_int_pos() + wall_int_pos()) / 2; }
DVector2 fcenter() const { return(point2Wall()->pos + pos) / 2; }
int deltax() const { return point2Wall()->wall_int_pos().X - wall_int_pos().X; }