コード例 #1
0
        // Vector = Vector - Vector

        public static Vector <T> Sub <T>(Vector <T> to, Vector <T> from)
        {
            return(new Vector <T>(
                       Algebra <T> .Sub(to.X, from.X),
                       Algebra <T> .Sub(to.Y, from.Y)));
        }
コード例 #2
0
        // Vector = Point - Point

        public static Vector <T> Sub <T>(Point <T> self, Point <T> vec)
        {
            return(new Vector <T>(
                       Algebra <T> .Sub(self.X, vec.X),
                       Algebra <T> .Sub(self.Y, vec.Y)));
        }
コード例 #3
0
        // Size = Size - Size

        public static Size <T> Sub <T>(Size <T> left, Size <T> right)
        {
            return(new Size <T>(
                       Algebra <T> .Sub(left.Width, right.Width),
                       Algebra <T> .Sub(left.Height, right.Height)));
        }