You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eea6b5e
Browse filesBrowse the repository at this point in the historyBrowse files
This method serializes the value of the object into bytes using the big-endian byte order. It expects the value to be a float. The serialized value is returned as a bytes object.
This method deserializes the payload into the value of the object. It expects the payload to be a 4-byte float in big-endian byte order. The deserialized value is assigned to the `value` attribute of the object. The deserialized object is then returned.
363
+
This method deserializes the payload into the value of the object. It expects the payload to be a 4-byte float in little-endian byte order. The deserialized value is assigned to the `value` attribute of the object. The deserialized object is then returned.
364
364
"""
365
-
(self.value,) =struct.unpack(">f", payload)
365
+
(self.value,) =struct.unpack("<f", payload)
366
366
returnself
367
367
368
368
def__eq__(self, other) ->Bool:
@@ -406,7 +406,7 @@ def serialize(self) -> bytes:
406
406
407
407
This method serializes the value of the object into bytes using the big-endian byte order. It expects the value to be a float. The serialized value is returned as a bytes object.
This method deserializes the payload into the value of the object. It expects the payload to be an 8-byte float in big-endian byte order. The deserialized value is assigned to the `value` attribute of the object. The deserialized object is then returned.
421
+
This method deserializes the payload into the value of the object. It expects the payload to be an 8-byte float in little-endian byte order. The deserialized value is assigned to the `value` attribute of the object. The deserialized object is then returned.
0 commit comments