cakephp/cakephp — pull request #859 by dereuromark (2012-09-19 23:43:06+00:00)
Title: adding CakeNumber::formatDelta() and fixing issue with near-zero values

corrected version of https://github.com/cakephp/cakephp/pull/771

in some cases you just want to display the values as signed values in the view than first figuring out the sign and passing this on to the format() method.
this is especially useful for outputting differences in values (e.g. "+50 meters since xxxx-xx-xx").

implementing it I found a related issue with format() and almost-zero values. fixed and test cases added.
-0.01 would not show as -0.0 anymore for format() now anymore.