Exemple #1
0
 public bool Equals(Prism obj)
 {
     if (obj == null)
     {
         return(false);
     }
     return(this.BaseSide == obj.BaseSide && this.Height == obj.Height && this.NumberOfEdges == obj.NumberOfEdges);
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 public static void StretchFigure(ref Prism obj)
 {
     obj.Height *= 2;
 }
Exemple #4
0
        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);
        }
Exemple #5
0
 public static int GetFigureSideSquare(Prism obj)
 {
     return(obj.BaseSide * obj.NumberOfEdges * obj.Height);
 }