示例#1
0
        public static float GetRotatedY(float currentX, float currentY, float pivotX, float pivotY, float angleDegrees)
        {
            float x  = currentX - pivotX;
            float y  = currentY - pivotY;
            float yr = (x * TrigLUT.SinDeg(angleDegrees)) + (y * TrigLUT.CosDeg(angleDegrees));

            return(yr + pivotY);
        }
示例#2
0
 public static float GetYAtEndOfRotatedLineByOrigin(float y, float lineLength, float angleDegrees)
 {
     return(y + TrigLUT.SinDeg(angleDegrees) * lineLength);
 }
示例#3
0
 public static float GetXAtEndOfRotatedLineByOrigin(float x, float lineLength, float angleDegrees)
 {
     return(x + TrigLUT.CosDeg(angleDegrees) * lineLength);
 }