Page MenuHomePhabricator

eina: Use matrix compose in place of equivalent code in matrix multiply
ClosedPublic

Authored by bryceharrington on Feb 14 2018, 10:42 AM.

Details

Summary

The eina_matrix3_compose and eina_matrix3_multiply API's are
mathematically identical (even though the implementations are
reversed... weird), except that the latter also includes a fastpath for
identity matrices.

Having two functionally equivalent APIs is redundant, so ideally one or
the other would be dropped. But in order avoid API breakage, just have
one routine wrapper the other and eliminate the internal redundancy.

(Note that the parameter signatures of the two routines are different -
eina_matrix3_compose() takes the two input matrices first, and the
output matrix last, while eina_matrix3_multiply() takes the parameters
in the reverse order. This inconsistency in the API style could result
in accidentally erroneous usage and would be an argument for deprecation
of one of the two APIs.)

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bryceharrington requested review of this revision.Feb 14 2018, 10:42 AM
bryceharrington created this revision.
cedric accepted this revision.Feb 14 2018, 11:36 AM

I am fine with deprecating one of them (Not removal, just EINA_DEPRECATED).

This revision is now accepted and ready to land.Feb 14 2018, 11:36 AM
This revision was automatically updated to reflect the committed changes.