private void Update() { if (isEnabled) { //The initial fast interval calculation is used for the initial heading even though CalculationMode is GPSAR if (calculationMode == CalculationMode.Compass || calculationMode == CalculationMode.Both || (calculationPhase == CalculationPhase.FastInterval && calculationMode != CalculationMode.Manual)) { if (calculationPhase == CalculationPhase.Stopped) { CalculationPhaseProp = CalculationPhase.FastInterval; } updateTimerCompass += Time.deltaTime; if (updateTimerCompass >= updateIntervalCompass) { //If RecordHeading returns true -> new record was recorded if (RecordCompassHeading()) { updateTimerCompass = 0; if (CalculationPhaseProp == CalculationPhase.FastInterval && FastIntervalPhaseSizeReached) { CalculationPhaseProp = CalculationPhase.SlowInterval; RecalculateMedianCompassHeading(); RecalculateHeading(); TriggerNorthHeadingUpdatedEvent(true); } } } } } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is OrderReturnServiceCharge other && ((Uid == null && other.Uid == null) || (Uid?.Equals(other.Uid) == true)) && ((SourceServiceChargeUid == null && other.SourceServiceChargeUid == null) || (SourceServiceChargeUid?.Equals(other.SourceServiceChargeUid) == true)) && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((CatalogObjectId == null && other.CatalogObjectId == null) || (CatalogObjectId?.Equals(other.CatalogObjectId) == true)) && ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) && ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) && ((AppliedMoney == null && other.AppliedMoney == null) || (AppliedMoney?.Equals(other.AppliedMoney) == true)) && ((TotalMoney == null && other.TotalMoney == null) || (TotalMoney?.Equals(other.TotalMoney) == true)) && ((TotalTaxMoney == null && other.TotalTaxMoney == null) || (TotalTaxMoney?.Equals(other.TotalTaxMoney) == true)) && ((CalculationPhase == null && other.CalculationPhase == null) || (CalculationPhase?.Equals(other.CalculationPhase) == true)) && ((Taxable == null && other.Taxable == null) || (Taxable?.Equals(other.Taxable) == true)) && ((AppliedTaxes == null && other.AppliedTaxes == null) || (AppliedTaxes?.Equals(other.AppliedTaxes) == true))); }
private void Awake() { CalculationPhaseProp = CalculationPhase.Stopped; updateIntervalCompass = updateIntervalCompassInitial; if (arCamera != null) { arCameraTransform = arCamera.transform; } }
/// <summary> /// Reset Compass-mode related variables to default values /// </summary> private void ResetCompassMode() { if (resetAfterTrackingLost) { ResetCompassReadings(); hasCompassHeading = false; manualOffset = 0; CalculationPhaseProp = CalculationPhase.Stopped; } }
public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj == this) { return(true); } return(obj is CatalogTax other && ((Name == null && other.Name == null) || (Name?.Equals(other.Name) == true)) && ((CalculationPhase == null && other.CalculationPhase == null) || (CalculationPhase?.Equals(other.CalculationPhase) == true)) && ((InclusionType == null && other.InclusionType == null) || (InclusionType?.Equals(other.InclusionType) == true)) && ((Percentage == null && other.Percentage == null) || (Percentage?.Equals(other.Percentage) == true)) && ((AppliesToCustomAmounts == null && other.AppliesToCustomAmounts == null) || (AppliesToCustomAmounts?.Equals(other.AppliesToCustomAmounts) == true)) && ((Enabled == null && other.Enabled == null) || (Enabled?.Equals(other.Enabled) == true))); }
public override int GetHashCode() { int hashCode = 29476180; if (Name != null) { hashCode += Name.GetHashCode(); } if (CalculationPhase != null) { hashCode += CalculationPhase.GetHashCode(); } if (InclusionType != null) { hashCode += InclusionType.GetHashCode(); } if (Percentage != null) { hashCode += Percentage.GetHashCode(); } if (AppliesToCustomAmounts != null) { hashCode += AppliesToCustomAmounts.GetHashCode(); } if (Enabled != null) { hashCode += Enabled.GetHashCode(); } return(hashCode); }
public override int GetHashCode() { int hashCode = -2013241171; if (Uid != null) { hashCode += Uid.GetHashCode(); } if (SourceServiceChargeUid != null) { hashCode += SourceServiceChargeUid.GetHashCode(); } if (Name != null) { hashCode += Name.GetHashCode(); } if (CatalogObjectId != null) { hashCode += CatalogObjectId.GetHashCode(); } if (Percentage != null) { hashCode += Percentage.GetHashCode(); } if (AmountMoney != null) { hashCode += AmountMoney.GetHashCode(); } if (AppliedMoney != null) { hashCode += AppliedMoney.GetHashCode(); } if (TotalMoney != null) { hashCode += TotalMoney.GetHashCode(); } if (TotalTaxMoney != null) { hashCode += TotalTaxMoney.GetHashCode(); } if (CalculationPhase != null) { hashCode += CalculationPhase.GetHashCode(); } if (Taxable != null) { hashCode += Taxable.GetHashCode(); } if (AppliedTaxes != null) { hashCode += AppliedTaxes.GetHashCode(); } return(hashCode); }
protected void ToString(List <string> toStringOutput) { toStringOutput.Add($"Uid = {(Uid == null ? "null" : Uid == string.Empty ? "" : Uid)}"); toStringOutput.Add($"SourceServiceChargeUid = {(SourceServiceChargeUid == null ? "null" : SourceServiceChargeUid == string.Empty ? "" : SourceServiceChargeUid)}"); toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}"); toStringOutput.Add($"CatalogObjectId = {(CatalogObjectId == null ? "null" : CatalogObjectId == string.Empty ? "" : CatalogObjectId)}"); toStringOutput.Add($"Percentage = {(Percentage == null ? "null" : Percentage == string.Empty ? "" : Percentage)}"); toStringOutput.Add($"AmountMoney = {(AmountMoney == null ? "null" : AmountMoney.ToString())}"); toStringOutput.Add($"AppliedMoney = {(AppliedMoney == null ? "null" : AppliedMoney.ToString())}"); toStringOutput.Add($"TotalMoney = {(TotalMoney == null ? "null" : TotalMoney.ToString())}"); toStringOutput.Add($"TotalTaxMoney = {(TotalTaxMoney == null ? "null" : TotalTaxMoney.ToString())}"); toStringOutput.Add($"CalculationPhase = {(CalculationPhase == null ? "null" : CalculationPhase.ToString())}"); toStringOutput.Add($"Taxable = {(Taxable == null ? "null" : Taxable.ToString())}"); toStringOutput.Add($"AppliedTaxes = {(AppliedTaxes == null ? "null" : $"[{ string.Join(", ", AppliedTaxes)} ]")}"); }
public override int GetHashCode() { int hashCode = 1266271501; if (Uid != null) { hashCode += Uid.GetHashCode(); } if (Name != null) { hashCode += Name.GetHashCode(); } if (CatalogObjectId != null) { hashCode += CatalogObjectId.GetHashCode(); } if (Percentage != null) { hashCode += Percentage.GetHashCode(); } if (AmountMoney != null) { hashCode += AmountMoney.GetHashCode(); } if (AppliedMoney != null) { hashCode += AppliedMoney.GetHashCode(); } if (TotalMoney != null) { hashCode += TotalMoney.GetHashCode(); } if (TotalTaxMoney != null) { hashCode += TotalTaxMoney.GetHashCode(); } if (CalculationPhase != null) { hashCode += CalculationPhase.GetHashCode(); } if (Taxable != null) { hashCode += Taxable.GetHashCode(); } if (AppliedTaxes != null) { hashCode += AppliedTaxes.GetHashCode(); } if (Metadata != null) { hashCode += Metadata.GetHashCode(); } return(hashCode); }
protected void ToString(List <string> toStringOutput) { toStringOutput.Add($"Name = {(Name == null ? "null" : Name == string.Empty ? "" : Name)}"); toStringOutput.Add($"CalculationPhase = {(CalculationPhase == null ? "null" : CalculationPhase.ToString())}"); toStringOutput.Add($"InclusionType = {(InclusionType == null ? "null" : InclusionType.ToString())}"); toStringOutput.Add($"Percentage = {(Percentage == null ? "null" : Percentage == string.Empty ? "" : Percentage)}"); toStringOutput.Add($"AppliesToCustomAmounts = {(AppliesToCustomAmounts == null ? "null" : AppliesToCustomAmounts.ToString())}"); toStringOutput.Add($"Enabled = {(Enabled == null ? "null" : Enabled.ToString())}"); }