コード例 #1
0
ファイル: Size.cs プロジェクト: donstany/Telerik-Academy
        public static Size GetRotatedSize(Size size, double angleToRotate)
        {
            var width = Calculator.AbsoluteCos(angleToRotate) * size.Width +
                        Calculator.AbsoluteSin(angleToRotate) * size.Height;

            var height = Calculator.AbsoluteSin(angleToRotate) * size.Width +
                         Calculator.AbsoluteCos(angleToRotate) * size.Height;

            return(new Size(width, height));
        }