You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
hi,
I was wondering why no FloatMap is available in Haxe. Here's this guy: http://api.haxe.org/Map.html telling us "K" cannot be a Float. I checked it and the doc is right, there's no FloatMap :) Why is that, lang devs?
Thanks for the answer in advance.
Bernd Ritter
unread,
Aug 28, 2014, 10:33:56 AM8/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
You need a fixed value for a key in a map. A Float cannot provide that because of precision. That would be my guess.
You can probably get a speedup by overriding the compare method to use
float comparison directly.
Best,
Juraj
Sam MacPherson
unread,
Aug 28, 2014, 2:14:28 PM8/28/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to haxe...@googlegroups.com
There are use cases I can see for this. For example if you want to use 53 bit integers instead of the regular 32 bits. Provided you arn't doing anything prone to rounding errors, I don't see why you shouldn't be able to use Floats as the key.