4 ms·
I'd just like to point out some examples of things that are implemented incompatibly commonly, not because they are different: Colors: (r{0.0-255.0}, g{0.
by gampleman 6y ago
I'd just like to point out some examples of things that are implemented incompatibly commonly, not because they are different:
Colors:
(r{0.0-255.0}, g{0.0-255.0}, b{0.0-255.0}, a{0.0-255.0})
vs
{ red = r{0.0-1.0}, green = g{0.0-1.0}, blue={0.0-1.0}, opacity = o{0.0-1.0} }
That is tuple vs record, different scaling factor, opacity vs transparency, but these representations are equivalent.
Or geopoint:
(lat, lng)
vs
(lng, lat)
I could go on...
- jacobolus 6y agohttps://macwright.com/lonlat/ https://macwright.com/lonlat/
- gampleman 6y agoIf transfer size isn't an (important) consideration, then the one true answer is: just use a record, which doesn't enforce an ordering and is explicit about which coordinate is which.
- Quekid5 6y agoThe color ones are not (unambiguously) equivalent, you're ignoring bit depth and assuming 8-bit color values in one of them.
- gampleman 6y agoI am not, both are floats. They are represented only in that range, because that's customary in web dev circles.
- Quekid5 6y agoFloats? What does R=255.0, etc. mean when the other example has R=1.0? Precision has nothing to do with it, the scale isn't even defined... which was my point.