From 2e7f64458d41ef75a16af2aeff56015e060491a2 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 23 Jul 2024 18:56:51 +0200 Subject: [PATCH] forgor this --- src/tables.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tables.h b/src/tables.h index 0ea09caf6..f643895a5 100644 --- a/src/tables.h +++ b/src/tables.h @@ -94,6 +94,12 @@ FUNCMATH FUNCINLINE static ATTRINLINE angle_t InvAngle(angle_t a) { return (ANGLE_MAX-a)+1; } + +// 315 = 45 +FUNCMATH FUNCINLINE static ATTRINLINE angle_t AbsAngle(angle_t a) +{ + return a & ANGLE_180 ? InvAngle(a) : a; +} // angle_t to fixed_t f(ANGLE_45) = 45*FRACUNIT FUNCMATH fixed_t AngleFixed(angle_t af); // fixed_t to angle_t f(45*FRACUNIT) = ANGLE_45