[PATCH] d3dx9: Correctly round constants in D3DXSHMultiply3 implementation

Alex Henrie alexhenrie24 at gmail.com
Wed Feb 7 22:38:02 CST 2018


2018-02-07 11:23 GMT-07:00 Matteo Bruni <matteo.mystral at gmail.com>:
> Not your fault but I think it would be nicer to define some constants
> (probably #defines, but actual const variables should also work)
> instead of replicating the same few coefficients many times.
> Unfortunately it looks like there is no standard naming for those
> constants. It's up to you, my thought at the moment is to go for
> something like:
>
> #define SH_MULT_COEFF_0_28 0.28209479f
>
> and so on.

We have to distinguish between 0.28209479 and 0.28209480, so I don't
think that using named constants is going to make this code more
readable, unfortunately.

-Alex



More information about the wine-devel mailing list