fixes for linux

This commit is contained in:
Bob Kuehne 2011-02-15 12:34:39 -05:00
parent cc485cb4c1
commit ba910c7be2
3 changed files with 4 additions and 4 deletions

View File

@ -332,14 +332,14 @@ namespace matrix_transform
detail::tvec4<U> const & viewport detail::tvec4<U> const & viewport
) )
{ {
assert(delta.x > 0.0f && delta.y > 0.0f) assert(delta.x > 0.0f && delta.y > 0.0f);
detail::tmat4x4<T> Result(1.0f); detail::tmat4x4<T> Result(1.0f);
if(!(delta.x > 0.0f && delta.y > 0.0f)) if(!(delta.x > 0.0f && delta.y > 0.0f))
return Result; // Error return Result; // Error
// Translate and scale the picked region to the entire window // Translate and scale the picked region to the entire window
Result = translate(Result, (T(viewport[2]) - T(2) * (x - T(viewport[0]))) / delta.x, (T(viewport[3]) - T(2) * (y - T(viewport[1]))) / delta.y, T(0)); Result = translate(Result, (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, T(0));
return scale(Result, T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)); return scale(Result, T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1));
} }

View File

@ -403,7 +403,7 @@ namespace quaternion{
if(flip) if(flip)
alpha = -alpha; alpha = -alpha;
return normalize(beta * x + alpha * y2); return normalize(beta * x + alpha * y);
} }
template <typename T> template <typename T>