This doesn't seem like an extension that needs game-specific builds; I'll send in a PR for that shortly.
May want to rework your tests as
Double.FromFloat(1234.34567) loses precision and is rendered as
1234.345703125; would recommend the
testing includes for that.
Quote:
Originally Posted by TheDS1337
What would be the usage of this? I don't think anybody doing sm is going to do some numerical analysis to care enough about such precisions.
|
I've actually needed to work with doubles pretty much once in SourceMod (TF2's sentry think ticks uses that type in memory, for whatever reason, and I needed to override it). In that particular case I ended up going with extremely manual bit-twiddling for float / double conversion, but this would've been pretty nice to work with provided it could give me the value as a
cell_t[2] (enum struct, perhaps?).
While I don't have a personal use for it, I could imagine it being handy for physics calculations or long-running operations. ¯\_(ツ)_/¯
__________________