It could probably use some optimization and I'm not sure about exact correctness of math used, but it should be immeasurably better than what we had before.
Planetary Temperature Fix for Multiple Stars

Temperature for planets in multiple systems should now be calculated correctly, or approximately correctly in all cases.
Fix for temperature overflows during system generation.

Everything normalized to Earth's values like a good little Earth chauvinist should.
Fixed temperature calculation for binary orbiting planets in quarternary systems.

Bug due to misinterpretation of (rare) orbital configuration, fixed by reordering of conditions checked.
Merge branch 'temperature_overflow_fix' into multiple_system_temperature_fix
Added (obvious) check to functions checking if body is coorbiting.
Merge pull request #2984 from corundscale/multiple_system_temperature_fix

Fix for faulty temperature calculation for multiple systems (also fixes temperature overflows).