How to convert a ubyte to a byte without losing information?
CharmingChocolate via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Aug 16 04:43:23 PDT 2015
I can cast a ubyte to a byte, but as far as I know I'd only get
positive values out of that conversion. If I was instead getting
a ubyte out of a function and I want to assign those bits to a
byte and have some of those numbers be interpreted as negative
values by the new type they're in, how would I cast that in D?
More information about the Digitalmars-d-learn
mailing list