diff --git a/glm/gtc/packing.hpp b/glm/gtc/packing.hpp
index 01e4e3e5..51a4cfc0 100644
--- a/glm/gtc/packing.hpp
+++ b/glm/gtc/packing.hpp
@@ -74,7 +74,7 @@ namespace glm
/// @see vec4 unpackUnorm4x8(uint32 p)
/// @see GLSL unpackUnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL float unpackUnorm1x8(uint8 pdf);
+ GLM_FUNC_DECL float unpackUnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer.
@@ -106,7 +106,7 @@ namespace glm
/// @see vec4 unpackUnorm4x8(uint32 p)
/// @see GLSL unpackUnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 p);
+ GLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into 8-bit integer value.
/// Then, the results are packed into the returned 8-bit unsigned integer.
@@ -132,7 +132,7 @@ namespace glm
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see GLSL unpackSnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL float unpackSnorm1x8(uint8 p);
+ GLM_FUNC_DECL float unpackSnorm1x8(uint8 const & p);
/// First, converts each component of the normalized floating-point value v into 8-bit integer values.
/// Then, the results are packed into the returned 16-bit unsigned integer.
@@ -164,7 +164,7 @@ namespace glm
/// @see vec4 unpackSnorm4x8(uint32 p)
/// @see GLSL unpackSnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 p);
+ GLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 const & p);
/// First, converts the normalized floating-point value v into a 16-bit integer value.
/// Then, the results are packed into the returned 16-bit unsigned integer.
@@ -177,7 +177,7 @@ namespace glm
/// @see uint64 packSnorm4x16(vec4 const & v)
/// @see GLSL packUnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL uint16 packUnorm1x16(float v);
+ GLM_FUNC_DECL uint16 packUnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers.
/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.
@@ -190,7 +190,7 @@ namespace glm
/// @see vec4 unpackUnorm4x16(uint64 p)
/// @see GLSL unpackUnorm2x16 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL float unpackUnorm1x16(uint16 p);
+ GLM_FUNC_DECL float unpackUnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values.
/// Then, the results are packed into the returned 64-bit unsigned integer.
@@ -235,7 +235,7 @@ namespace glm
/// @see uint64 packSnorm4x16(vec4 const & v)
/// @see GLSL packSnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL uint16 packSnorm1x16(float v);
+ GLM_FUNC_DECL uint16 packSnorm1x16(float const & v);
/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers.
/// Then, each component is converted to a normalized floating-point value to generate the returned scalar.
@@ -248,7 +248,7 @@ namespace glm
/// @see vec4 unpackSnorm4x16(uint64 p)
/// @see GLSL unpackSnorm4x8 man page
/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions
- GLM_FUNC_DECL float unpackSnorm1x16(uint16 p);
+ GLM_FUNC_DECL float unpackSnorm1x16(uint16 const & p);
/// First, converts each component of the normalized floating-point value v into 16-bit integer values.
/// Then, the results are packed into the returned 64-bit unsigned integer.
diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl
index 9c98d3d0..8bedca6e 100644
--- a/glm/gtc/packing.inl
+++ b/glm/gtc/packing.inl
@@ -225,7 +225,7 @@ namespace detail
GLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 const & p)
{
float Unpack(static_cast(p));
- return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
+ return Unpack * static_cast(0.0039215686274509803921568627451); // 1 / 255
}
GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v)
diff --git a/readme.txt b/readme.txt
index 3a27b905..67be8123 100644
--- a/readme.txt
+++ b/readme.txt
@@ -43,6 +43,7 @@ GLM 0.9.5.1: 2014-XX-XX
- Deprecated degrees for function parameters and display a message
- Added possible static_cast conversion of GLM types (#72)
- Fixed error 'inverse' is not a member of 'glm' from glm::unProject (#146)
+- Fixed mismatch of GTC_packing declaration and definition prototypes
================================================================================
GLM 0.9.5.0: 2013-12-25