svenvc / ston

STON - Smalltalk Object Notation - A lightweight text-based, human-readable data interchange format for class-based object-oriented languages like Smalltalk.
MIT License
135 stars 32 forks source link

Color values lose precision when serialized #36

Closed webwarrior-ws closed 2 years ago

webwarrior-ws commented 2 years ago

There is unnecessary rounding of values in Color>>#stonOn: that causes Color instances to not be the same after serialize/materialize roundtrip. However issue #34 must also be addressed for any Color instance to be truly equal to itself after roundtrip, because alpha is stored as a float.

svenvc commented 2 years ago

Yes, you are right.

I implemented your suggestion in https://github.com/svenvc/ston/commit/a9959114c3036aad1dd5c327a5b8ac3309e4c3e5