imglib / imglib2-realtransform

Spatial transformations for ImgLib2
Other
7 stars 7 forks source link

fix: Scale.preConcatenate #34

Closed bogovicj closed 2 years ago

bogovicj commented 2 years ago
bogovicj commented 2 years ago

Scale.preConcatenate currently has a bug here.

Consider this example:

Scale s1 = new Scale( 2, 3 );
Scale s2 = new Scale( 4, 5 );
s1.preConcatenate(s2);
System.out.println( Arrays.toString( s1.getScaleCopy() ));

This code prints [15.0, 3.0], where I would expect [8.0, 15.0] This PR fixes the issue and adds some tests.