public override bool Equals(object obj) { var other = obj as PointLight; return((other != null) && (Position.Equals(other.Position)) && (Intensity.Equals(other.Intensity))); }
public bool Equals(IPeak other) { if (ReferenceEquals(this, other)) { return(true); } return(MZ.Equals(other.X) && Intensity.Equals(other.Y)); }
public bool Equals(PointLight other) { if (other is null) { return(false); } return(Position.Equals(other.Position) && Intensity.Equals(other.Intensity)); }
private bool Equals(Setup other) { return(String.Equals(MinerName, other.MinerName) && String.Equals(MinerVersion, other.MinerVersion) && String.Equals(ApiVersion, other.ApiVersion) && String.Equals(MiningUrl, other.MiningUrl) && Intensity.Equals(other.Intensity) && String.Equals(PerformanceState, other.PerformanceState) && String.Equals(BiosVersion, other.BiosVersion) && String.Equals(DriverVersion, other.DriverVersion) && String.Equals(OperatingSystem, other.OperatingSystem)); }
public bool Equals(ForumRecruitmentDetail input) { if (input == null) { return(false); } return (( TopicId == input.TopicId || (TopicId.Equals(input.TopicId)) ) && ( MicrophoneRequired == input.MicrophoneRequired || (MicrophoneRequired != null && MicrophoneRequired.Equals(input.MicrophoneRequired)) ) && ( Intensity == input.Intensity || (Intensity != null && Intensity.Equals(input.Intensity)) ) && ( Tone == input.Tone || (Tone != null && Tone.Equals(input.Tone)) ) && ( Approved == input.Approved || (Approved != null && Approved.Equals(input.Approved)) ) && ( ConversationId == input.ConversationId || (ConversationId.Equals(input.ConversationId)) ) && ( PlayerSlotsTotal == input.PlayerSlotsTotal || (PlayerSlotsTotal.Equals(input.PlayerSlotsTotal)) ) && ( PlayerSlotsRemaining == input.PlayerSlotsRemaining || (PlayerSlotsRemaining.Equals(input.PlayerSlotsRemaining)) ) && ( Fireteam == input.Fireteam || (Fireteam != null && Fireteam.SequenceEqual(input.Fireteam)) ) && ( KickedPlayerIds == input.KickedPlayerIds || (KickedPlayerIds != null && KickedPlayerIds.SequenceEqual(input.KickedPlayerIds)) )); }
public bool Equals(Light other) { return(Intensity.Equals(other.Intensity) && Position.Equals(other.Position)); }
public bool ChangeWeather() { /*Weather statistics: * - 30% - no change * - 30% - weather gets better (if not fine) or change weather type * - 30% - weather worsens (if not fine) * - 10% - radical change (if not fine)*/ var r1 = Random; var oldWeather = CurrentWeather; var oldIntensity = Intensity; //No change in weather if (r1 < 30) { return(false); } //Reset to fine if (r1 < 60 && Intensity < 0.333333343f) { CurrentWeather = WeatherType.WEATHER_TYPE_FINE; Intensity = 0.0F; } //Weather gets better if (r1 < 60 && CurrentWeather == WeatherType.WEATHER_TYPE_FINE) { Intensity -= 0.333333343f; return(true); } //Weather gets worse if (r1 < 90 && CurrentWeather == WeatherType.WEATHER_TYPE_FINE) { Intensity += 0.333333343f; return(true); } /*Radical change: * - if light -> heavy * - if medium -> change weather type * - if heavy -> 50% light, 50% change weather type*/ if (CurrentWeather == WeatherType.WEATHER_TYPE_FINE) { if (Intensity < 0.333333343f) { Intensity = 0.9999f; return(true); } if (this.Intensity > 0.6666667f && this.Random < 50) { this.Intensity -= 0.6666667f; return(true); } this.CurrentWeather = WeatherType.WEATHER_TYPE_FINE; this.Intensity = 0.0f; } var rainChance = CurrentSeason.RainChance; var snowChance = CurrentSeason.SnowChance; var stormChance = CurrentSeason.StormChance; r1 = Random; if (r1 < rainChance) { CurrentWeather = WeatherType.WEATHER_TYPE_RAIN; } else if (r1 < snowChance) { CurrentWeather = WeatherType.WEATHER_TYPE_SNOW; } else if (r1 < stormChance) { CurrentWeather = WeatherType.WEATHER_TYPE_STORM; } else { CurrentWeather = WeatherType.WEATHER_TYPE_FINE; } /*New weather statistics (if not fine): * - 85% light * - 7% medium * - 7% heavy * If fine 100% sun (no fog)*/ if (CurrentWeather == WeatherType.WEATHER_TYPE_FINE) { Intensity = 0.0f; } else if (r1 < 90) { Intensity = RandomThird; } else { //Severe change, but how severe? if (Random < 50) { Intensity = RandomThird + 0.3334f; } else { Intensity = RandomThird + 0.6667f; } } return((CurrentWeather != oldWeather) || (Intensity.Equals(oldIntensity))); }
public bool Equals(MZPeak other) { return(MZ.Equals(other.MZ) && Intensity.Equals(other.Intensity)); }