Browse Source

fixed work

Nicolas Winkler 6 năm trước cách đây
mục cha
commit
ec2cd41fdb
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      libmandel/include/Fixed.h

+ 1 - 1
libmandel/include/Fixed.h

@@ -29,7 +29,7 @@ struct Fixed128
         const double twoToThe32 = double(0x100000000ULL);
         upper = uint64_t(int64_t(x * twoToThe32));
         double remainder = x - double(upper) / twoToThe32;
-        lower = uint64_t(int64_t(x * twoToThe32 * twoToThe32 * twoToThe32));
+        lower = uint64_t(int64_t(remainder * twoToThe32 * twoToThe32 * twoToThe32));
         /*int integerPart = ::floor(x);
         double fractionalPart = x - integerPart;
         upper = int64_t(integerPart) << 32;