Float to String conversion.

412 views
Skip to first unread message

Robert Śmietana

unread,
Mar 25, 2013, 6:30:50 AM3/25/13
to haxe...@googlegroups.com
I do not claim it is an error, but there is something very annoying in Haxe 3. Std.string() method, invoked with rounded Float value, returns Int string (without ".0" on the end). '$variable' behaves in the same way.

I needed to write my own method, because I generate ESSL sourcecode from Haxe program and ESSL (and GLSL) make a distinction between float and int constants.

sergey miryanov

unread,
Mar 25, 2013, 6:36:47 AM3/25/13
to haxe...@googlegroups.com


On Mon, Mar 25, 2013 at 4:30 PM, Robert Śmietana <logo...@gmail.com> wrote:
I do not claim it is an error, but there is something very annoying in Haxe 3. Std.string() method, invoked with rounded Float value, returns Int string (without ".0" on the end). '$variable' behaves in the same way.

I needed to write my own method, because I generate ESSL sourcecode from Haxe program and ESSL (and GLSL) make a distinction between float and int constants.


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages