dist calculations
Took a little time to look at the dist calcs... in Mob::Dist it reads
Code:
float Mob::Dist(const Mob &other) { Code:
float Mob::Dist(const Mob &other) Haven't tested this mind you, just a thought :-) |
Not to get off topic but... i love the sig lol... kind of like the saying:
"I am a compulsive liar". Makes you wonder. About the code, you should compile it and see what happens. ~Dan |
Quote:
Quote:
I know that Trumpcard is looking for something like this and thought I would toss it out. If it works well enough, I'll do the rest of the dist calcs if he wants. |
Why use doubles? I doubt we need 64 bit accuracy anyway, so unless someone is running a 64 bit server, floats are 2x faster and use half the memory space.
|
You're right, those should be floats...
The original programmer put them in as doubles, we've just never gone back around to fixing it... Good catch on that, didnt even notice it.. I'll fix those in CVS tonight. |
At the assembly level, it doesn't seem to make a difference since they are all converted to 80 bit values on load. And I don't see a difference in the timing in it either.
I still agree the precision should be only what is needed because it creates overhead to convert in C++. |
Re: dist calculations
It is usually better to calculate distance squared, since you eliminate the root op.
Quote:
|
Thats what DistNoRoot and DistNoRootNoZ are for
|
All times are GMT -4. The time now is 07:30 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.