Exemple #1
0
        public GasVolume removeDirect(GasVolume second, out float amount)
        {
            float newMetersCubed = metersCubed;
            float oldTotal       = mixture.totalPressure;
            var   expanded       = second.ExpandInto(newMetersCubed).mixture;
            var   newMixture     = mixture - expanded;

            amount = (oldTotal - newMixture.totalPressure) / expanded.totalPressure;

            return(new GasVolume(newMixture, newMetersCubed));
        }
Exemple #2
0
        public GasVolume addDirect(GasVolume second)
        {
            float newMetersCubed = metersCubed;

            return(new GasVolume(mixture + second.ExpandInto(newMetersCubed).mixture, newMetersCubed));
        }