Make alpha cube root faster by declaring LUT as "static const".
This commit is contained in:
parent
2ca446506b
commit
64cb7589e8
2 changed files with 3 additions and 3 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r745 \cu(Sat 21 Jan 01:09:46 CET 2023)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r745 \cu(2023-01-21 01:09:46)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r746 \cu(Sun 22 Jan 00:46:28 CET 2023)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r746 \cu(2023-01-22 00:46:28)\c-";
|
||||
|
|
|
|||
|
|
@ -984,7 +984,7 @@ Class SWWMPickupFlash : SWWMNonInteractiveActor
|
|||
// needed since cube roots scale very badly when there's thousands of these on the map
|
||||
private static double AlphaCubeRoot( double alpha )
|
||||
{
|
||||
double lut[256] =
|
||||
static const double lut[] =
|
||||
{
|
||||
0.000000000, 0.250244738, 0.297592823, 0.329340597, 0.353899503, 0.374203165, 0.391654181, 0.407042226,
|
||||
0.420859807, 0.433436601, 0.445005066, 0.455735780, 0.465757939, 0.475171947, 0.484057512, 0.492479061,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue