Minor fixup of ToClip

This commit is contained in:
Jack Andersen 2018-06-23 16:39:18 -10:00
parent 1347e23597
commit 11cd08a30a
1 changed files with 3 additions and 5 deletions

View File

@ -77,7 +77,7 @@ public:
CVector4f(float x, float y, float z, float w) { assign(x, y, z, w); } CVector4f(float x, float y, float z, float w) { assign(x, y, z, w); }
CVector4f(const CColor& other); CVector4f(const CColor& other);
CVector4f(const CVector3f& other) CVector4f(const CVector3f& other, float wIn = 1.f)
{ {
#if __SSE__ #if __SSE__
mVec128 = other.mVec128; mVec128 = other.mVec128;
@ -86,14 +86,12 @@ public:
y = other.y; y = other.y;
z = other.z; z = other.z;
#endif #endif
w = 1.0f; w = wIn;
} }
static CVector4f ToClip(const zeus::CVector3f& v, float w) static CVector4f ToClip(const zeus::CVector3f& v, float w)
{ {
CVector4f ret(v * w); return CVector4f(v * w, w);
ret.w = w;
return ret;
} }
inline CVector3f toVec3f() const inline CVector3f toVec3f() const