private static float GetGenerationChanceAgeGapFactor(Pawn p1, Pawn p2, bool ex) { float num = Mathf.Abs(p1.ageTracker.AgeBiologicalYearsFloat - p2.ageTracker.AgeBiologicalYearsFloat); if (ex) { float num2 = LovePartnerRelationUtility.MinPossibleAgeGapAtMinAgeToGenerateAsLovers(p1, p2); if (num2 >= 0.0) { num = Mathf.Min(num, num2); } float num3 = LovePartnerRelationUtility.MinPossibleAgeGapAtMinAgeToGenerateAsLovers(p2, p1); if (num3 >= 0.0) { num = Mathf.Min(num, num3); } } if (num > 40.0) { return(0f); } float value = GenMath.LerpDouble(0f, 20f, 1f, 0.001f, num); return(Mathf.Clamp(value, 0.001f, 1f)); }