WebAssembly image dithering example

Allen Garvey allen.garvey at gmail.com
Fri Aug 3 15:23:39 UTC 2018


On Friday, 3 August 2018 at 09:41:53 UTC, Radu wrote:
> You might wanna change some of the code to be more idiomatic, 
> for example `DitherRCoefficient` can be turned into and enum 
> manifest constant.

Thanks for the advice. I wanted to use something similar to C's 
#define, but with my quick Google search a mixin template looked 
like the closest I could get. Based on your comment and reading 
the docs on it, the enum manifest constant looks like what I was 
originally trying to do, though I think now I'm going to change 
it to actually compute the cbrt through a callback to 
JavaScript's Math.cbrt function.




More information about the digitalmars-d-ldc mailing list