public static bool GetReportedSeason(ref Season __result, float yearPct, float latitude) { int year1000 = (int)(yearPct * 1000f); if (!yearLatitudeSeason.TryGetValue(year1000, out Dictionary <float, Season> latitudeSeason)) { latitudeSeason = new Dictionary <float, Season>(); yearLatitudeSeason.Add(year1000, latitudeSeason); } if (!latitudeSeason.TryGetValue(latitude, out Season season)) { SeasonUtility.GetSeason(yearPct, latitude, out float spring, out float summer, out float fall, out float winter, out float permanentSummer, out float permanentWinter); if (permanentSummer == 1f) { season = Season.PermanentSummer; } if (permanentWinter == 1f) { season = Season.PermanentWinter; } if (permanentSummer != 1f && permanentWinter != 1f) { season = GenMath.MaxBy(Season.Spring, spring, Season.Summer, summer, Season.Fall, fall, Season.Winter, winter); } latitudeSeason.Add(latitude, season); } __result = season; return(false); }
public static Season GetReportedSeason(float yearPct, float latitude) { float by; float by2; float by3; float by4; float num; float num2; SeasonUtility.GetSeason(yearPct, latitude, out by, out by2, out by3, out by4, out num, out num2); Season result; if (num == 1f) { result = Season.PermanentSummer; } else if (num2 == 1f) { result = Season.PermanentWinter; } else { result = GenMath.MaxBy <Season>(Season.Spring, by, Season.Summer, by2, Season.Fall, by3, Season.Winter, by4); } return(result); }
public static LatitudeSection GetDominantLatitudeSection(float latitude) { GetLatitudeSection(latitude, out var equatorial, out var seasonal, out var polar); if (equatorial == 0f && seasonal == 0f && polar == 0f) { return(LatitudeSection.Undefined); } return(GenMath.MaxBy(LatitudeSection.Equatorial, equatorial, LatitudeSection.Seasonal, seasonal, LatitudeSection.Polar, polar)); }
public static Season GetDominantSeason(float yearPct, float latitude) { float by; float by2; float by3; float by4; float by5; float by6; SeasonUtility.GetSeason(yearPct, latitude, out by, out by2, out by3, out by4, out by5, out by6); return(GenMath.MaxBy <Season>(Season.Spring, by, Season.Summer, by2, Season.Fall, by3, Season.Winter, by4, Season.PermanentSummer, by5, Season.PermanentWinter, by6)); }
public static Season GetDominantSeason(float yearPct, float latitude) { float by = default(float); float by2 = default(float); float by3 = default(float); float by4 = default(float); float by5 = default(float); float by6 = default(float); SeasonUtility.GetSeason(yearPct, latitude, out by, out by2, out by3, out by4, out by5, out by6); return(GenMath.MaxBy(Season.Spring, by, Season.Summer, by2, Season.Fall, by3, Season.Winter, by4, Season.PermanentSummer, by5, Season.PermanentWinter, by6)); }
public static LatitudeSection GetDominantLatitudeSection(float latitude) { float num = default(float); float num2 = default(float); float num3 = default(float); LatitudeSectionUtility.GetLatitudeSection(latitude, out num, out num2, out num3); if (num == 0.0 && num2 == 0.0 && num3 == 0.0) { return(LatitudeSection.Undefined); } return(GenMath.MaxBy(LatitudeSection.Equatorial, num, LatitudeSection.Seasonal, num2, LatitudeSection.Polar, num3)); }
public static Season GetReportedSeason(float yearPct, float latitude) { GetSeason(yearPct, latitude, out var spring, out var summer, out var fall, out var winter, out var permanentSummer, out var permanentWinter); if (permanentSummer == 1f) { return(Season.PermanentSummer); } if (permanentWinter == 1f) { return(Season.PermanentWinter); } return(GenMath.MaxBy(Season.Spring, spring, Season.Summer, summer, Season.Fall, fall, Season.Winter, winter)); }
public static LatitudeSection GetDominantLatitudeSection(float latitude) { float num; float num2; float num3; LatitudeSectionUtility.GetLatitudeSection(latitude, out num, out num2, out num3); LatitudeSection result; if (num == 0f && num2 == 0f && num3 == 0f) { result = LatitudeSection.Undefined; } else { result = GenMath.MaxBy <LatitudeSection>(LatitudeSection.Equatorial, num, LatitudeSection.Seasonal, num2, LatitudeSection.Polar, num3); } return(result); }
public static Season GetReportedSeason(float yearPct, float latitude) { float by = default(float); float by2 = default(float); float by3 = default(float); float by4 = default(float); float num = default(float); float num2 = default(float); SeasonUtility.GetSeason(yearPct, latitude, out by, out by2, out by3, out by4, out num, out num2); if (num == 1.0) { return(Season.PermanentSummer); } if (num2 == 1.0) { return(Season.PermanentWinter); } return(GenMath.MaxBy(Season.Spring, by, Season.Summer, by2, Season.Fall, by3, Season.Winter, by4)); }
public static Season GetDominantSeason(float yearPct, float latitude) { GetSeason(yearPct, latitude, out var spring, out var summer, out var fall, out var winter, out var permanentSummer, out var permanentWinter); return(GenMath.MaxBy(Season.Spring, spring, Season.Summer, summer, Season.Fall, fall, Season.Winter, winter, Season.PermanentSummer, permanentSummer, Season.PermanentWinter, permanentWinter)); }