Mercurial > mm7
diff OurMath.cpp @ 2380:56f87a5c402b
Merge
author | Grumpy7 |
---|---|
date | Sat, 21 Jun 2014 00:42:34 +0200 |
parents | 48dbf99c0f7f |
children | f4af3b203f65 |
line wrap: on
line diff
--- a/OurMath.cpp Sat Jun 21 00:41:20 2014 +0200 +++ b/OurMath.cpp Sat Jun 21 00:42:34 2014 +0200 @@ -204,10 +204,13 @@ //----- (00452A9E) -------------------------------------------------------- int integer_sqrt(int val) { +/////////////////////////////// +//Получение квадратного корня// +/////////////////////////////// + signed int result; // eax@2 unsigned int v2; // edx@3 unsigned int v3; // edi@3 - //signed int v4; // ebx@3 int v5; // esi@4 if (val < 1) @@ -216,7 +219,6 @@ v2 = 0; v3 = val; result = 0; - //v4 = 16; for (uint i = 0; i < 16; ++i) { result *= 2; @@ -228,9 +230,7 @@ ++result; v2 -= v5; } - //--v4; } - //while ( v4 ); if ( val - result * result >= (unsigned int)(result - 1) ) ++result; return result;