/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(DeadReckoningParameter obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return(false); } if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm) { ivarsEqual = false; } if (obj._otherParameters.Length != 15) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < 15; idx++) { if (this._otherParameters[idx] != obj._otherParameters[idx]) { ivarsEqual = false; } } } if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration)) { ivarsEqual = false; } if (!this._entityAngularVelocity.Equals(obj._entityAngularVelocity)) { ivarsEqual = false; } return(ivarsEqual); }
/// <summary> /// Compares for reference AND value equality. /// </summary> /// <param name="obj">The object to compare with this instance.</param> /// <returns> /// <c>true</c> if both operands are equal; otherwise, <c>false</c>. /// </returns> public bool Equals(DeadReckoningParameter obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm) { ivarsEqual = false; } if (obj._otherParameters.Length != 15) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < 15; idx++) { if (this._otherParameters[idx] != obj._otherParameters[idx]) { ivarsEqual = false; } } } if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration)) { ivarsEqual = false; } if (!this._entityAngularVelocity.Equals(obj._entityAngularVelocity)) { ivarsEqual = false; } return ivarsEqual; }