public bool Equals(Prism obj) { if (obj == null) { return(false); } return(this.BaseSide == obj.BaseSide && this.Height == obj.Height && this.NumberOfEdges == obj.NumberOfEdges); }
public static bool PrismInBox(this Prism obj, int length, int height, int width) { if (height >= obj.Height && length > obj.BaseSide && width > obj.BaseSide) { return(true); } else if (height >= obj.BaseSide && length > obj.Height && width > obj.BaseSide) { return(true); } else { return(false); } }
public static void StretchFigure(ref Prism obj) { obj.Height *= 2; }
public static double GetFigureCapasity(Prism obj) { double radians = (180 / obj.NumberOfEdges) * (Math.PI / 180); return(((obj.NumberOfEdges * Math.Pow(obj.BaseSide, 2)) / (4 * Math.Tan(radians))) * obj.Height); }
public static int GetFigureSideSquare(Prism obj) { return(obj.BaseSide * obj.NumberOfEdges * obj.Height); }