EDDiscovery / EliteDangerousCore

Elite Dangerous specific submodule
Apache License 2.0
2 stars 18 forks source link

powerf,basef scope tuck #118

Closed jnorthrup closed 1 year ago

jnorthrup commented 1 year ago

https://github.com/EDDiscovery/EliteDangerousCore/blob/c0b34ab75f2cda9de75376d6a763cba9c7f756d0/EliteDangerous/EliteDangerous/EDCalculations.cs#L102

tiny tweak, means almost nothing.. found this while reading the code:

before

                double powerf = Math.Pow(MaxFuelPerJump / fuelmultiplier, 1 / PowerConstant);
                double basev = powerf * massf;
                if (fuel >= MaxFuelPerJump)
                {
                    return (basev + FSDGuardianBoosterRange) * boost;
                }

after

                if (fuel >= MaxFuelPerJump)
                {
                double powerf = Math.Pow(MaxFuelPerJump / fuelmultiplier, 1 / PowerConstant);
                double basev = powerf * massf;
               return (basev + FSDGuardianBoosterRange) * boost;
                }
robbyxp1 commented 1 year ago

Noted.