From 43190a51f799a3ef315c0b6245b70ee3a09a64ac Mon Sep 17 00:00:00 2001 From: aap Date: Sat, 25 Apr 2020 15:55:38 +0200 Subject: [PATCH] removed ugly imag/real from quat again --- src/rwbase.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rwbase.h b/src/rwbase.h index d486849..383a239 100644 --- a/src/rwbase.h +++ b/src/rwbase.h @@ -248,12 +248,8 @@ Quat makeQuat(float32 w, const V3d &vec); struct Quat { - // order is important for streaming - union { - struct { float32 x, y, z, w; }; - // needed for RW compatibility - struct { V3d imag; float32 real; }; - }; + // order is important for streaming and RW compatibility + float32 x, y, z, w; static Quat rotation(float32 angle, const V3d &axis){ return makeQuat(cos(angle/2.0f), scale(normalize(axis), sin(angle/2.0f))); }