public static Cone operator *(Cone x, double y) { Cone ans = new Cone(); ans.r = x.r * y; ans.h = x.h * y; return(ans); }
public static Cone operator -(Cone x, Cone y) { Cone ans = new Cone(); ans.r = x.r - y.r; ans.h = x.h - y.h; return(ans); }
public static Cone operator /(Cone x, double y) { if (y == 0.0) { throw new DivideByZeroException(); } Cone ans = new Cone(); ans.r = x.r / y; ans.h = x.h / y; return(ans); }
public override bool Equals(object x) { Cone obj = (Cone)x; if (h == obj.h && r == obj.r) { return(true); } else { return(false); } }