Loading lib_rend/ivas_rotation.c +11 −5 Original line number Diff line number Diff line Loading @@ -227,11 +227,17 @@ void Euler2Quat( IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { // @TODO implementation here quat->w = -3.0f; quat->x = yaw; quat->y = pitch; quat->z = roll; float cr = cos( roll * 0.5f ); float sr = sin( roll * 0.5f ); float cp = cos( pitch * 0.5f ); float sp = sin( pitch * 0.5f ); float cy = cos( yaw * 0.5f ); float sy = sin( yaw * 0.5f ); quat->w = cr * cp * cy + sr * sp * sy; quat->x = sr * cp * cy - cr * sp * sy; quat->y = cr * sp * cy + sr * cp * sy; quat->z = cr * cp * sy - sr * sp * cy; return; } Loading Loading
lib_rend/ivas_rotation.c +11 −5 Original line number Diff line number Diff line Loading @@ -227,11 +227,17 @@ void Euler2Quat( IVAS_QUATERNION *quat /* o : quaternion describing the rotation */ ) { // @TODO implementation here quat->w = -3.0f; quat->x = yaw; quat->y = pitch; quat->z = roll; float cr = cos( roll * 0.5f ); float sr = sin( roll * 0.5f ); float cp = cos( pitch * 0.5f ); float sp = sin( pitch * 0.5f ); float cy = cos( yaw * 0.5f ); float sy = sin( yaw * 0.5f ); quat->w = cr * cp * cy + sr * sp * sy; quat->x = sr * cp * cy - cr * sp * sy; quat->y = cr * sp * cy + sr * cp * sy; quat->z = cr * cp * sy - sr * sp * cy; return; } Loading