Added assert on input values for glm::perspective
This commit is contained in:
parent
cf41c03c94
commit
149df8e3db
@ -238,6 +238,9 @@ namespace glm
|
|||||||
valType const & zFar
|
valType const & zFar
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
assert(aspect != valType(0));
|
||||||
|
assert(zFar != zNear);
|
||||||
|
|
||||||
#ifdef GLM_FORCE_RADIANS
|
#ifdef GLM_FORCE_RADIANS
|
||||||
valType const rad = fovy;
|
valType const rad = fovy;
|
||||||
#else
|
#else
|
||||||
@ -284,8 +287,8 @@ namespace glm
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> infinitePerspective
|
GLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> infinitePerspective
|
||||||
(
|
(
|
||||||
T fovy,
|
T fovy,
|
||||||
T aspect,
|
T aspect,
|
||||||
T zNear
|
T zNear
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user