Tizen Native API  5.0
2x2 Matrices in floating point

Definition and operations for 2x3 matrices.

Functions

void eina_matrix2_values_set (Eina_Matrix2 *m, double xx, double xy, double yx, double yy)
 Sets the values of the coefficients of the given floating point matrix.
void eina_matrix2_values_get (const Eina_Matrix2 *m, double *xx, double *xy, double *yx, double *yy)
 Gets the values of the coefficients of the given floating point matrix.
void eina_matrix2_inverse (Eina_Matrix2 *out, const Eina_Matrix2 *mat)
 Computes the inverse with check of the given matrix.
void eina_matrix2_identity (Eina_Matrix2 *m)
 Sets the given floating point matrix to the identity matrix.
void eina_matrix2_array_set (Eina_Matrix2 *m, const double *v)
 Sets array to matrix.
void eina_matrix2_copy (Eina_Matrix2 *dst, const Eina_Matrix2 *src)
 Copies matrix.
void eina_matrix2_multiply (Eina_Matrix2 *out, const Eina_Matrix2 *mat_a, const Eina_Matrix2 *mat_b)
 Multiplies two matrices.
void eina_matrix2_multiply_copy (Eina_Matrix2 *out, const Eina_Matrix2 *mat_a, const Eina_Matrix2 *mat_b)
 Multiplies two matrices with check.
Eina_Matrix_Type eina_matrix2_type_get (const Eina_Matrix2 *m)
 Returns the type of the given floating point matrix.

Typedefs

typedef struct _Eina_Matrix2 Eina_Matrix2

Typedef Documentation

A 2x2 floating point matrix.


Function Documentation

void eina_matrix2_array_set ( Eina_Matrix2 m,
const double *  v 
)

Sets array to matrix.

Parameters:
[out]mThe result matrix.
[in]vThe the array[4] for set.

Set to matrix first 4 elements from array

Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_copy ( Eina_Matrix2 dst,
const Eina_Matrix2 src 
)

Copies matrix.

Parameters:
[out]dstThe matrix copy.
[in]srcThe matrix to copy.
Since (EFL) :
1.17
Since :
3.0

Sets the given floating point matrix to the identity matrix.

Parameters:
[out]mThe floating point matrix to set.

This function sets m to the identity matrix. No check is done on m.

Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_inverse ( Eina_Matrix2 out,
const Eina_Matrix2 mat 
)

Computes the inverse with check of the given matrix.

Parameters:
[out]outThe matrix to inverse.
[in]matThe inverse matrix.

This function inverse the matrix out and stores the result in mat. No check is done on out or mat. If out can not be invertible, then mat is set to the identity matrix.

Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_multiply ( Eina_Matrix2 out,
const Eina_Matrix2 mat_a,
const Eina_Matrix2 mat_b 
)

Multiplies two matrices.

Parameters:
[out]outThe resulting matrix.
[in]mat_aThe first member of the multiplication.
[in]mat_bThe second member of the multiplication.
Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_multiply_copy ( Eina_Matrix2 out,
const Eina_Matrix2 mat_a,
const Eina_Matrix2 mat_b 
)

Multiplies two matrices with check.

Parameters:
[out]outThe resulting matrix.
[in]mat_aThe first member of the multiplication.
[in]mat_bThe second member of the multiplication.
Since (EFL) :
1.17
Since :
3.0

Returns the type of the given floating point matrix.

Parameters:
[in]mThe floating point matrix.
Returns:
The type of the matrix.

This function returns the type of the matrix m. No check is done on m.

Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_values_get ( const Eina_Matrix2 m,
double *  xx,
double *  xy,
double *  yx,
double *  yy 
)

Gets the values of the coefficients of the given floating point matrix.

Parameters:
[out]mThe floating point matrix.
[in]xxThe first coefficient value.
[in]xyThe second coefficient value.
[in]yxThe fourth coefficient value.
[in]yyThe fifth coefficient value.

This function gets the values of the coefficients of the matrix m. No check is done on m.

See also:
eina_matrix2_values_set()
Since (EFL) :
1.17
Since :
3.0
void eina_matrix2_values_set ( Eina_Matrix2 m,
double  xx,
double  xy,
double  yx,
double  yy 
)

Sets the values of the coefficients of the given floating point matrix.

Parameters:
[out]mThe floating point matrix.
[in]xxThe first coefficient value.
[in]xyThe second coefficient value.
[in]yxThe fourth coefficient value.
[in]yyThe fifth coefficient value.

This function sets the values of the coefficients of the matrix m. No check is done on m.

See also:
eina_matrix2_values_get()
Since (EFL) :
1.17
Since :
3.0