From 2ab6b6cfe81505b029f2da397cef0bb58989444f Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 17 Jun 2021 21:32:57 -0400 Subject: (mkosarek) Beginning to explain rigidbody physics in a reasonable way --- shared_cpp/mathlib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'shared_cpp') diff --git a/shared_cpp/mathlib.h b/shared_cpp/mathlib.h index c922032..fc2ef0c 100644 --- a/shared_cpp/mathlib.h +++ b/shared_cpp/mathlib.h @@ -7,6 +7,7 @@ #define MAX(x, y) (((x) > (y)) ? (x) : (y)) #define MIN(x, y) (((x) < (y)) ? (x) : (y)) #define ABS(x) (x < 0 ? -x : x) +#define SIGN(x) (x < 0 ? -1 : 1) struct Vector2 { float x = 0; -- cgit v1.2.1