From 85c1952cc20de870c1be8b48b9ea7262b3b39352 Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 18 Jan 2024 09:48:02 +0100 Subject: [PATCH] feat: added vector comparison for int vectors --- core/src/vmath.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/vmath.h b/core/src/vmath.h index 029463f..7c99083 100644 --- a/core/src/vmath.h +++ b/core/src/vmath.h @@ -160,6 +160,11 @@ Vector vaveragef(Vector* array, size_t count) { return vmulff(acc, 1.0f/(float)count); } +static inline +int veqi(IVector a, IVector b) { + return a.x == b.x && a.y == b.y; +} + static inline IVector vaddi(IVector a, IVector b) { return (IVector){a.x + b.x, a.y + b.y};