From afc10fb79a317085634d9404d2d4db7ddaa54ace Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 18 Aug 2024 22:29:47 +0100 Subject: [PATCH] Add rgb elements to V3f --- src/vec/vec.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/vec/vec.h b/src/vec/vec.h index 53c694d..86ca1b4 100644 --- a/src/vec/vec.h +++ b/src/vec/vec.h @@ -31,9 +31,18 @@ struct f32x2 { typedef struct f32x3 V3f; struct f32x3 { - f32 x; - f32 y; - f32 z; + union { + f32 x; + f32 r; + }; + union { + f32 y; + f32 g; + }; + union { + f32 z; + f32 b; + }; }; typedef struct f32x4 V4f;