Commit 5bb41351 authored by sagnowski's avatar sagnowski
Browse files

Relax validation of Euler angles

parent 864df27a
Loading
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -49,11 +49,8 @@ ivas_error validate_quaternion( IVAS_QUATERNION q )
    epsilon = 1e-5f;

    // Euler angles if w == -3
    if ( q.w == -3.0f &&
         ( q.x < -180.0f || 180.0f < q.x    // yaw out of range
           || q.y < -90.0f || 90.0f < q.y   // pitch out of range
           || q.z < -180.0f || 180.0f < q.z // roll out of range
           ) )
    // We only limit pitch range. Yaw and roll can have any value as they safely wrap around.
    if ( q.w == -3.0f && ( q.y < -90.0f || 90.0f < q.y ) )
    {
        return IVAS_ERR_INVALID_QUATERNION;
    }