コード例 #1
0
ファイル: LineBrush.cs プロジェクト: ARCHlVE/farseer-physics
        private void CalculateRotation(Vector2 difference)
        {
            Vector2.Normalize(ref difference, out _normalizedDifference);
            Vector2.Dot(ref _xVector, ref _normalizedDifference, out _theta);

            _theta = Calculator.ACos(_theta);
            if (difference.Y < 0)
            {
                _theta = -_theta;
            }
            _rotation = _theta;
        }