public static Vector2 Perpendicular(Vector2 original)
        {
            //To create a perpendicular vector switch X and Y, then make Y negative
            float x = original.X;
            float y = original.Y;

            y = -y; // 或者 x = -x,分别是+pi/2和-pi/2的效果

            return new Vector2(y, x);
        }

 

posted on 2013-08-03 22:55  The_Fake  阅读(761)  评论(0编辑  收藏  举报