/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(RightCircularCone other) { return other != null && (_circleBase == other._circleBase && Math.Abs(_height - other._height) < 1); }
public void RightCircularConeTest() { RightCircularCone rightCircularCone = new RightCircularCone(3, 4); Assert.AreEqual(3, rightCircularCone.Radius); Assert.AreEqual(4, rightCircularCone.Height); Assert.AreEqual(37.699112, Math.Round(rightCircularCone.Volume, 6)); Assert.AreEqual(75.398224, Math.Round(rightCircularCone.SurfaceArea, 6)); RightCircularCone rightCircularCone2 = new RightCircularCone(3, 4); Assert.AreEqual(rightCircularCone, rightCircularCone2); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(RightCircularCone other) { return((other != null) && (_circleBase == other._circleBase) && (Math.Abs(_height - other._height) < 1)); }