<tfoot id='aqPS5'></tfoot>
  • <small id='aqPS5'></small><noframes id='aqPS5'>

      <bdo id='aqPS5'></bdo><ul id='aqPS5'></ul>
      <legend id='aqPS5'><style id='aqPS5'><dir id='aqPS5'><q id='aqPS5'></q></dir></style></legend>

        <i id='aqPS5'><tr id='aqPS5'><dt id='aqPS5'><q id='aqPS5'><span id='aqPS5'><b id='aqPS5'><form id='aqPS5'><ins id='aqPS5'></ins><ul id='aqPS5'></ul><sub id='aqPS5'></sub></form><legend id='aqPS5'></legend><bdo id='aqPS5'><pre id='aqPS5'><center id='aqPS5'></center></pre></bdo></b><th id='aqPS5'></th></span></q></dt></tr></i><div id='aqPS5'><tfoot id='aqPS5'></tfoot><dl id='aqPS5'><fieldset id='aqPS5'></fieldset></dl></div>
      1. 如何围绕另一个点旋转一个点

        how to rotate a point around another point(如何围绕另一个点旋转一个点)
          <tbody id='eBGAB'></tbody>
            <i id='eBGAB'><tr id='eBGAB'><dt id='eBGAB'><q id='eBGAB'><span id='eBGAB'><b id='eBGAB'><form id='eBGAB'><ins id='eBGAB'></ins><ul id='eBGAB'></ul><sub id='eBGAB'></sub></form><legend id='eBGAB'></legend><bdo id='eBGAB'><pre id='eBGAB'><center id='eBGAB'></center></pre></bdo></b><th id='eBGAB'></th></span></q></dt></tr></i><div id='eBGAB'><tfoot id='eBGAB'></tfoot><dl id='eBGAB'><fieldset id='eBGAB'></fieldset></dl></div>

            <small id='eBGAB'></small><noframes id='eBGAB'>

            1. <legend id='eBGAB'><style id='eBGAB'><dir id='eBGAB'><q id='eBGAB'></q></dir></style></legend>
                <bdo id='eBGAB'></bdo><ul id='eBGAB'></ul>
                • <tfoot id='eBGAB'></tfoot>
                  本文介绍了如何围绕另一个点旋转一个点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在写一个游戏.我需要知道如何将点 a 围绕点 b 旋转给定的度数.我正在用 java 写这个,它将成为我的课程的一部分,Point.

                  I am writing a game. I need to know how to rotate point a around point b by a given number of degrees. I am writing this in java and it is going to be part of my class, Point.

                  推荐答案

                  double x1 = point.x - center.x;
                  double y1 = point.y - center.y;
                  
                  double x2 = x1 * Math.cos(angle) - y1 * Math.sin(angle));
                  double y2 = x1 * Math.sin(angle) + y1 * Math.cos(angle));
                  
                  point.x = x2 + center.x;
                  point.y = y2 + center.y;
                  

                  这种方法使用旋转矩阵.point"是你的a点,center"是你的b点.

                  This approach uses rotation matrices. "point" is your point a, "center" is your point b.

                  这篇关于如何围绕另一个点旋转一个点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                  <i id='DzCBr'><tr id='DzCBr'><dt id='DzCBr'><q id='DzCBr'><span id='DzCBr'><b id='DzCBr'><form id='DzCBr'><ins id='DzCBr'></ins><ul id='DzCBr'></ul><sub id='DzCBr'></sub></form><legend id='DzCBr'></legend><bdo id='DzCBr'><pre id='DzCBr'><center id='DzCBr'></center></pre></bdo></b><th id='DzCBr'></th></span></q></dt></tr></i><div id='DzCBr'><tfoot id='DzCBr'></tfoot><dl id='DzCBr'><fieldset id='DzCBr'></fieldset></dl></div>
                        <tbody id='DzCBr'></tbody>

                      1. <small id='DzCBr'></small><noframes id='DzCBr'>

                        <legend id='DzCBr'><style id='DzCBr'><dir id='DzCBr'><q id='DzCBr'></q></dir></style></legend>
                          <bdo id='DzCBr'></bdo><ul id='DzCBr'></ul>

                            <tfoot id='DzCBr'></tfoot>