/// <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(DeadReckoningParameters obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return(false); } if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm) { ivarsEqual = false; } if (obj._parameters.Length != 15) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < 15; idx++) { if (this._parameters[idx] != obj._parameters[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(DeadReckoningParameters obj) { bool ivarsEqual = true; if (obj.GetType() != this.GetType()) { return false; } if (this._deadReckoningAlgorithm != obj._deadReckoningAlgorithm) { ivarsEqual = false; } if (obj._parameters.Length != 15) { ivarsEqual = false; } if (ivarsEqual) { for (int idx = 0; idx < 15; idx++) { if (this._parameters[idx] != obj._parameters[idx]) { ivarsEqual = false; } } } if (!this._entityLinearAcceleration.Equals(obj._entityLinearAcceleration)) { ivarsEqual = false; } if (!this._entityAngularVelocity.Equals(obj._entityAngularVelocity)) { ivarsEqual = false; } return ivarsEqual; }