They added in the recent patch that Square root (integer) but you can Square root only real with it, but it can only Square root real. Did they want to save 1 conversion from us or did they messed it up? It would help lot in my map if I could Square root integer.
You mean they added a SquareRoot function that takes an integer and returns a real?
Well, convert it back to an integer and you got it.
If you want to round up/down correctly, then add 0.5 and convert it back to an integer after that.
SquareRoot generally returns a real, because the square root of a number is in 99.9% of all cases a real number.
@s3rius: Go
no man, they added square root (integer) which takes real and returns integer. (otherwise my first post would make no sense)
And square root integer would be always in the bound of max real value as I I am right about 4 bill the max integer and 500k the max real.
I think it just save 1 conversion, there are several integer function added in with it as well (truncated do nothing then convert real to int). Not so sure about the real and integer limit
You converted some integer value to a real with a math fuction of square root...? And want to get the converted value back to int ?
Math Answer:To get the square root, divide the logarithm by 2 and convert the value back.
I am currently experimenting with banks that save int(converted to real) numbers as square roots into the bank to counter bank hax. Its a work in progress.Im not saying its Dept of def. crackproof, but will keep you scratching your head to figure out the "key" for a long time.And as a second 'lock' mechanism im implementing an sort of MD5 checksum that is calculated in the game.
But for now my lips are sealed on how to do this...until i perfect it
I will do a tutorial on the idea which you can customise it in the future.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
They added in the recent patch that Square root (integer) but you can Square root only real with it, but it can only Square root real. Did they want to save 1 conversion from us or did they messed it up? It would help lot in my map if I could Square root integer.
You mean they added a SquareRoot function that takes an integer and returns a real?
Well, convert it back to an integer and you got it.
If you want to round up/down correctly, then add 0.5 and convert it back to an integer after that.
SquareRoot generally returns a real, because the square root of a number is in 99.9% of all cases a real number.
Wrong on so many level, the amount of number is infinite, can't use percentage there.
@s3rius: Go no man, they added square root (integer) which takes real and returns integer. (otherwise my first post would make no sense)
And square root integer would be always in the bound of max real value as I I am right about 4 bill the max integer and 500k the max real.
@Hookah604: Go
I think it just save 1 conversion, there are several integer function added in with it as well (truncated do nothing then convert real to int). Not so sure about the real and integer limit
This wasn't supposed to be a scientifically correct explanation, but should only illustrate why it's stupid to return the value as an integer.
In SC2 there also are only 8796093022207 numbers larger than 0, with 0.024% of them returning an integer (a "round" fixed value).
I might not have specified that, it's still the only numbers that really matter to us here :)
Let me quote what you said:
I'm sorry to say but this REALLY doesn't make much sense, does it? :D
meh
@s3rius: Go
Ohh, I do speak senseless, it must been very early morning for me.)
@SouLCarveRR: Go
There are 4-5 function like that.
If i Understanf right, @Hookah
You converted some integer value to a real with a math fuction of square root...? And want to get the converted value back to int ?
Math Answer:To get the square root, divide the logarithm by 2 and convert the value back.
I am currently experimenting with banks that save int(converted to real) numbers as square roots into the bank to counter bank hax. Its a work in progress.Im not saying its Dept of def. crackproof, but will keep you scratching your head to figure out the "key" for a long time.And as a second 'lock' mechanism im implementing an sort of MD5 checksum that is calculated in the game.
But for now my lips are sealed on how to do this...until i perfect it I will do a tutorial on the idea which you can customise it in the future.