summaryrefslogtreecommitdiffhomepage
path: root/include/CoreRuntimeKit/C++
diff options
context:
space:
mode:
Diffstat (limited to 'include/CoreRuntimeKit/C++')
-rw-r--r--include/CoreRuntimeKit/C++/base_math9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/CoreRuntimeKit/C++/base_math b/include/CoreRuntimeKit/C++/base_math
index a025b62..fac078d 100644
--- a/include/CoreRuntimeKit/C++/base_math
+++ b/include/CoreRuntimeKit/C++/base_math
@@ -49,12 +49,13 @@ inline real_type sqrt(real_type in) {
if (in == 0) return 0;
if (in == not_a_number) return not_a_number;
- auto constexpr const static Base = 2;
+ auto constexpr static kRootBase = 2;
+ auto constexpr static kNumberBase = 10;
- auto x = in / Base;
+ auto x = in / kRootBase;
- for (int i = 0; i < 10; ++i) {
- x = (x + in / x) / Base;
+ for (int i = 0; i < kNumberBase; ++i) {
+ x = (x + in / x) / kRootBase;
}
return x;