Merge branch '0.9.3' of ssh://ogl-math.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.3
This commit is contained in:
@@ -261,8 +261,8 @@ namespace glm
|
||||
Result[0][0] = w;
|
||||
Result[1][1] = h;
|
||||
Result[2][2] = (zFar + zNear) / (zFar - zNear);
|
||||
Result[2][3] = valType(1);
|
||||
Result[3][2] = -(valType(2) * zFar * zNear) / (zFar - zNear);
|
||||
Result[2][3] = -valType(1);
|
||||
Result[3][2] = (valType(2) * zFar * zNear) / (zFar - zNear);
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,15 @@ namespace detail
|
||||
struct compute_linearRand
|
||||
{
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const
|
||||
GLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const;
|
||||
/*
|
||||
{
|
||||
GLM_STATIC_ASSERT(0, "'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types.");
|
||||
return Min;
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER half compute_linearRand::operator()<half> (half const & Min, half const & Max) const
|
||||
{
|
||||
@@ -41,6 +43,12 @@ namespace detail
|
||||
{
|
||||
return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min;
|
||||
}
|
||||
|
||||
template <>
|
||||
GLM_FUNC_QUALIFIER long double compute_linearRand::operator()<long double> (long double const & Min, long double const & Max) const
|
||||
{
|
||||
return (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min;
|
||||
}
|
||||
}//namespace detail
|
||||
|
||||
template <typename genType>
|
||||
|
||||
Reference in New Issue
Block a user