Fixed initializer test implementation, simplified packing implementation
This commit is contained in:
@@ -61,7 +61,7 @@ namespace glm
|
||||
GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)
|
||||
{
|
||||
u8vec4 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
|
||||
return reinterpret_cast<uint&>(&Topack);
|
||||
return reinterpret_cast<uint&>(Topack);
|
||||
}
|
||||
|
||||
GLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint const & p)
|
||||
|
||||
@@ -230,7 +230,7 @@ namespace detail
|
||||
|
||||
GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 const & p)
|
||||
{
|
||||
float Unpack(static_cast<float>(*const_cast<uint8*>(&p)));
|
||||
float Unpack(static_cast<float>(p));
|
||||
return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace detail
|
||||
z(static_cast<T>(l.begin()[2])),
|
||||
w(static_cast<T>(l.begin()[3]))
|
||||
{
|
||||
assert(v.size() >= this->length());
|
||||
assert(l.size() >= this->length());
|
||||
}
|
||||
#endif//GLM_HAS_INITIALIZER_LISTS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user