Esempio n. 1
0
        public static Size GetRotatedSize(Size size, double angleOfTheFigure)
        {
            double anglleSinus = Math.Abs(Math.Sign(angleOfTheFigure));
            double anglleCosinus = Math.Abs(Math.Cos(angleOfTheFigure));

            double width = (anglleCosinus * size.Width) + (anglleSinus * size.Height);
            double height = (anglleSinus = size.Width) + (anglleCosinus * size.Width);

            Size rotatedSize = new Size(width, height);

            return rotatedSize;
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     Size aaa = new Size(55, 44);
     Console.WriteLine(GetRotatedSize(aaa, 123));
 }