想象一下,你在2d空间中有两个点,你需要将这些点中的一个旋转X度,另一个点作为中心.
float distX = Math.abs( centerX -point2X );
float distY = Math.abs( centerY -point2Y );
float dist = FloatMath.sqrt( distX*distX + distY*distY );
Run Code Online (Sandbox Code Playgroud)
到目前为止,我只是找到了两点之间的距离......任何想法我应该从哪里开始?
