1
0
mirror of https://github.com/TACIXAT/XorShift128Plus synced 2025-05-14 18:04:04 +00:00

fix type-hints

This commit is contained in:
Matt Oestreich 2025-04-21 14:58:15 -05:00
parent 1c924f964d
commit 342df4e982

View File

@ -62,8 +62,8 @@ class FirefoxAndSafariRandomnessPredictor:
self.__se_state0 = self.__se_state1 # sym_state0 = sym_state1
self.__se_state1 = s1 # sym_state1 = s1
def __to_double(self, val: int):
def __to_double(self, val: int) -> float:
return float(val & 0x1FFFFFFFFFFFFF) / (0x1 << 53)
def __recover_mantissa(self, double: float) -> float:
def __recover_mantissa(self, double: float) -> int:
return double * (0x1 << 53)