Make cogl_matrix_init_from_quaternion take a const quaternion
The quaternion is not modified so for consistency with the rest of the API it should probably be const. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 7fa8c05c2ffb90cba03289a04e37866efc0890a5)
This commit is contained in:
parent
bdc8a12ea1
commit
0210cc40f9
@ -1711,7 +1711,7 @@ _cogl_matrix_init_from_matrix_without_inverse (CoglMatrix *matrix,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
_cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
_cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
||||||
CoglQuaternion *quaternion)
|
const CoglQuaternion *quaternion)
|
||||||
{
|
{
|
||||||
float qnorm = _COGL_QUATERNION_NORM (quaternion);
|
float qnorm = _COGL_QUATERNION_NORM (quaternion);
|
||||||
float s = (qnorm > 0.0f) ? (2.0f / qnorm) : 0.0f;
|
float s = (qnorm > 0.0f) ? (2.0f / qnorm) : 0.0f;
|
||||||
@ -1746,7 +1746,7 @@ _cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
|||||||
|
|
||||||
void
|
void
|
||||||
cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
||||||
CoglQuaternion *quaternion)
|
const CoglQuaternion *quaternion)
|
||||||
{
|
{
|
||||||
_cogl_matrix_init_from_quaternion (matrix, quaternion);
|
_cogl_matrix_init_from_quaternion (matrix, quaternion);
|
||||||
}
|
}
|
||||||
|
@ -487,12 +487,10 @@ cogl_matrix_get_array (const CoglMatrix *matrix);
|
|||||||
* @quaternion: A #CoglQuaternion
|
* @quaternion: A #CoglQuaternion
|
||||||
*
|
*
|
||||||
* Initializes @matrix from a #CoglQuaternion rotation.
|
* Initializes @matrix from a #CoglQuaternion rotation.
|
||||||
*
|
|
||||||
* Return value: a pointer to the float array
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
cogl_matrix_init_from_quaternion (CoglMatrix *matrix,
|
||||||
CoglQuaternion *quaternion);
|
const CoglQuaternion *quaternion);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user