/// <summary> /// Gets the temperature. /// </summary> /// <returns>The temperature.</returns> public float GetTemperature() { float t = TotalGas.IsZero() ? 0.0f : ThermalEnergy / TotalGas; if (float.IsNaN(t)) { UnityDebugger.Debugger.Log("Atmosphere", "NaN result. Total gas = " + TotalGas + ". Energy = " + ThermalEnergy + "."); } return(TotalGas.IsZero() ? 0.0f : ThermalEnergy / TotalGas); }
/// <summary> /// Gets the temperature value for this room. /// </summary> /// <returns> The temperature value as <see cref="TemperatureValue"/>. </returns> public TemperatureValue GetTemperature() { return(TotalGas.IsZero() ? TemperatureValue.AbsoluteZero : internalTemperature); }