colour lib
Manu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 2 16:54:01 PDT 2016
On 2 September 2016 at 22:36, Steven Schveighoffer via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On 8/31/16 1:58 AM, Manu via Digitalmars-d wrote:
>>
>> I have this implementation issue, which I'm having trouble applying
>> good judgement, I'd like to survey opinions...
>>
>> So, RGB colours depend on this 'normalised integer' concept, that is:
>> unsigned: luminance = val / IntType.max
>> signed: luminance = max(val / IntType.max, -1.0)
>>
>> So I introduce NormalizedInt(T), which does that.
>>
>> The question is, what should happen when someone does:
>> NormalisedInt!ubyte nub;
>> NormalizedInt!byte nb;
>
>
> Is it s or z ? :)
Oh piss off! ;)
I have to think *REALLY HARD* to write 'z', and when I type it without
thinking I accidentally write it correctly.
It's SO HARD to constantly spell wrong in this code!
More information about the Digitalmars-d
mailing list