summaryrefslogtreecommitdiff
path: root/indra/llmath/v3color.h
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2024-06-10 18:16:13 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-10 19:30:17 +0300
commit4b52dd754b41948efca0087ccac6d813f1fcce3f (patch)
tree71f229639cd15bc3a6ed6ba8fdd15cc1b8b48835 /indra/llmath/v3color.h
parentd9ae73ca9ab0546cb7c260a4e7180a952f14c20d (diff)
Fix incorrect use of VX/VY/VZ/VW indices when color components are accessed
Diffstat (limited to 'indra/llmath/v3color.h')
-rw-r--r--indra/llmath/v3color.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/indra/llmath/v3color.h b/indra/llmath/v3color.h
index ea26e9eb76..7b92f85a0c 100644
--- a/indra/llmath/v3color.h
+++ b/indra/llmath/v3color.h
@@ -196,17 +196,17 @@ inline LLColor3::LLColor3(void)
inline LLColor3::LLColor3(F32 r, F32 g, F32 b)
{
- mV[VX] = r;
- mV[VY] = g;
- mV[VZ] = b;
+ mV[VRED] = r;
+ mV[VGREEN] = g;
+ mV[VBLUE] = b;
}
inline LLColor3::LLColor3(const F32 *vec)
{
- mV[VX] = vec[VX];
- mV[VY] = vec[VY];
- mV[VZ] = vec[VZ];
+ mV[VRED] = vec[VRED];
+ mV[VGREEN] = vec[VGREEN];
+ mV[VBLUE] = vec[VBLUE];
}
#if LL_WINDOWS
@@ -226,11 +226,11 @@ inline LLColor3::LLColor3(const char* color_string) // takes a string of format
char tempstr[7];
strncpy(tempstr,color_string,6); /* Flawfinder: ignore */
tempstr[6] = '\0';
- mV[VZ] = (F32)strtol(&tempstr[4],NULL,16)/255.f;
+ mV[VBLUE] = (F32)strtol(&tempstr[4],NULL,16)/255.f;
tempstr[4] = '\0';
- mV[VY] = (F32)strtol(&tempstr[2],NULL,16)/255.f;
+ mV[VGREEN] = (F32)strtol(&tempstr[2],NULL,16)/255.f;
tempstr[2] = '\0';
- mV[VX] = (F32)strtol(&tempstr[0],NULL,16)/255.f;
+ mV[VRED] = (F32)strtol(&tempstr[0],NULL,16)/255.f;
}
inline const LLColor3& LLColor3::setToBlack(void)