예제 #1
0
파일: Size.cs 프로젝트: kikooo52/C-Programs
        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;
        }
예제 #2
0
파일: Size.cs 프로젝트: kikooo52/C-Programs
 static void Main(string[] args)
 {
     Size aaa = new Size(55, 44);
     Console.WriteLine(GetRotatedSize(aaa, 123));
 }