lohalo: assume identity with no matrix

Make it valid to call lohalo without specifying the inverse jacobian matrix.
The code would be simplified by only having the condition once in code.
parent da5b2eea
......@@ -1957,10 +1957,10 @@ gegl_sampler_lohalo_get ( GeglSampler* restrict self,
* Ellipse reference:
* http://en.wikipedia.org/wiki/Ellipse#Canonical_form
const gdouble a = self->inverse_jacobian->coeff[0][0];
const gdouble b = self->inverse_jacobian->coeff[0][1];
const gdouble c = self->inverse_jacobian->coeff[1][0];
const gdouble d = self->inverse_jacobian->coeff[1][1];
const gdouble a = self->inverse_jacobian?self->inverse_jacobian->coeff[0][0]:1;
const gdouble b = self->inverse_jacobian?self->inverse_jacobian->coeff[0][1]:0;
const gdouble c = self->inverse_jacobian?self->inverse_jacobian->coeff[1][0]:0;
const gdouble d = self->inverse_jacobian?self->inverse_jacobian->coeff[1][1]:1;
* Computations are done in double precision because "direct"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment