HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.03k stars 648 forks source link

Don't print floats with decimal 0 as int #11566

Closed Simn closed 5 months ago

Simn commented 5 months ago

For #11532

This will need updates on all targets. I hope none of them do this natively.

Simn commented 5 months ago

Uhm, this seems more difficult than I thought because printf's g specifier does take off the .0. I thought I could force it with %#, but at least on eval that doesn't seem to work.

Help?

Simn commented 5 months ago

This isn't going to work because even a simple console.log(1.0) on JS prints it as 1. I find this silly but it is what it is.