Nicolas Winkler il y a 6 ans
Parent
commit
ec2cd41fdb
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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;