imagej / ImageJ

Public domain software for processing and analyzing scientific images
http://imagej.org
Other
557 stars 221 forks source link

toString(number) macro changed return value for strings #167

Closed christianrickert closed 2 years ago

christianrickert commented 2 years ago

The ImageJ macro toString("abc") returns:

"abc" in ImageJ v1.53r (and earlier), but surprisingly "NaN" in ImageJ v1.53s.

The change might be related to the changes announced in the ImageJ Release Notes:

Thanks to Stein Rorvik, fixed a bug that caused the toString(number,decimalPlaces) macro function to not work as expected.

While I prefer the current implementation (it's cleaner), the return value for non-numeric strings should be clearly stated in the Built-in Macro Functions.

Originally reported here: https://github.com/fiji/fiji/issues/308.

rasband commented 2 years ago

This regression was fixed in the ImageJ 1.53t7 daily build.

christianrickert commented 2 years ago

@rasband Where can I find the source changes for this fix (diff)?

rasband commented 2 years ago

Where can I find the source changes for this fix (diff)?

https://github.com/imagej/ImageJ/commit/dd2eb0ac8cecaad99ce0f0f5046731c6b8247bb7

christianrickert commented 2 years ago

Thank you very much!