View Single Post
nosoop
Veteran Member
Join Date: Aug 2014
Old 02-17-2020 , 05:03   Re: [EXTENSION] Double extension
Reply With Quote #6

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 View Post
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. ¯\_(ツ)_/¯
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 02-17-2020 at 05:23.
nosoop is offline