mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed packDouble2x32 on XCode 4.5, issue #37
This commit is contained in:
parent
a33a2b2c42
commit
37e380ca9b
@ -136,12 +136,42 @@ namespace glm
|
|||||||
|
|
||||||
GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v)
|
GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2<detail::uint32> const & v)
|
||||||
{
|
{
|
||||||
return *(double*)&v;
|
struct uint32_pair
|
||||||
|
{
|
||||||
|
detail::uint32 x;
|
||||||
|
detail::uint32 y;
|
||||||
|
};
|
||||||
|
|
||||||
|
union helper
|
||||||
|
{
|
||||||
|
uint32_pair input;
|
||||||
|
double output;
|
||||||
|
} Helper;
|
||||||
|
|
||||||
|
Helper.input.x = v.x;
|
||||||
|
Helper.input.y = v.y;
|
||||||
|
|
||||||
|
return Helper.output;
|
||||||
|
//return *(double*)&v;
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v)
|
GLM_FUNC_QUALIFIER detail::tvec2<uint> unpackDouble2x32(double const & v)
|
||||||
{
|
{
|
||||||
return *(detail::tvec2<uint>*)&v;
|
struct uint32_pair
|
||||||
|
{
|
||||||
|
detail::uint32 x;
|
||||||
|
detail::uint32 y;
|
||||||
|
};
|
||||||
|
|
||||||
|
union helper
|
||||||
|
{
|
||||||
|
double input;
|
||||||
|
uint32_pair output;
|
||||||
|
} Helper;
|
||||||
|
|
||||||
|
Helper.input = v;
|
||||||
|
|
||||||
|
return detail::tvec2<uint>(Helper.output.x, Helper.output.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v)
|
GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2<float> const & v)
|
||||||
|
@ -44,6 +44,7 @@ GLM 0.9.4.2: 2013-01-XX
|
|||||||
- Fixed isnan and isinf for CUDA compiler
|
- Fixed isnan and isinf for CUDA compiler
|
||||||
- Fixed GLM_FORCE_RADIANS on glm::perspective
|
- Fixed GLM_FORCE_RADIANS on glm::perspective
|
||||||
- Fixed GCC warnings
|
- Fixed GCC warnings
|
||||||
|
- Fixed packDouble2x32 on XCode
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
GLM 0.9.4.1: 2012-12-22
|
GLM 0.9.4.1: 2012-12-22
|
||||||
|
Loading…
Reference in New Issue
Block a user