Inheritance: AbstractVector
        public static FDGVector3 operator -(FDGVector3 a, FDGVector3 b)
        {
            FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);

            temp.Subtract(b);
            return(temp);
        }
        public static FDGVector3 operator +(FDGVector3 a, FDGVector3 b)
        {
            FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);

            temp.Add(b);
            return(temp);
        }
        public static FDGVector3 operator *(FDGVector3 a, float b)
        {
            FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);

            temp.Multiply(b);
            return(temp);
        }
        public static FDGVector3 operator *(float a, FDGVector3 b)
        {
            FDGVector3 temp = new FDGVector3(b.x, b.y, b.z);

            temp.Multiply(a);
            return(temp);
        }
        public static FDGVector3 operator /(FDGVector3 a, float b)
        {
            FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);

            temp.Divide(b);
            return(temp);
        }
        public override AbstractVector Subtract(AbstractVector v2)
        {
            FDGVector3 v32 = v2 as FDGVector3;

            x = x - v32.x;
            y = y - v32.y;
            z = z - v32.z;
            return(this);
        }
        public override AbstractVector Add(AbstractVector v2)
        {
            FDGVector3 v32 = v2 as FDGVector3;

            x = x + v32.x;
            y = y + v32.y;
            z = z + v32.z;
            return(this);
        }
Exemplo n.º 8
0
        public override AbstractVector Subtract(AbstractVector v2)
        {
            FDGVector3 v32 = v2 as FDGVector3;

            X = X - v32.X;
            Y = Y - v32.Y;
            Z = Z - v32.Z;

            return(this);
        }
Exemplo n.º 9
0
        public override AbstractVector Add(AbstractVector v2)
        {
            FDGVector3 v32 = v2 as FDGVector3;

            X = X + v32.X;
            Y = Y + v32.Y;
            Z = Z + v32.Z;

            return(this);
        }
Exemplo n.º 10
0
        public bool Equals(FDGVector3 p)
        {
            // If parameter is null return false:
            if (p is null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((X == p.X) && (Y == p.Y) && (Z == p.Z));
        }
Exemplo n.º 11
0
        public bool Equals(FDGVector3 p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((x == p.x) && (y == p.y) && (z == p.z));
        }
Exemplo n.º 12
0
        public override bool Equals(object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            FDGVector3 p = obj as FDGVector3;

            if (p is null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((X == p.X) && (Y == p.Y) && (Z == p.Z));
        }
Exemplo n.º 13
0
        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            FDGVector3 p = obj as FDGVector3;

            if ((System.Object)p == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return((x == p.x) && (y == p.y) && (z == p.z));
        }
Exemplo n.º 14
0
 public static FDGVector3 operator /(FDGVector3 a, float b)
 {
     FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);
     temp.Divide(b);
     return temp;
 }
Exemplo n.º 15
0
 public static FDGVector3 operator *(FDGVector3 a, float b)
 {
     FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);
     temp.Multiply(b);
     return temp;
 }
Exemplo n.º 16
0
 public static FDGVector3 operator *(float a, FDGVector3 b)
 {
     FDGVector3 temp = new FDGVector3(b.x, b.y, b.z);
     temp.Multiply(a);
     return temp;
 }
Exemplo n.º 17
0
 public static FDGVector3 operator +(FDGVector3 a, FDGVector3 b)
 {
     FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);
     temp.Add(b);
     return temp;
 }
Exemplo n.º 18
0
 public static FDGVector3 operator -(FDGVector3 a, FDGVector3 b)
 {
     FDGVector3 temp = new FDGVector3(a.x, a.y, a.z);
     temp.Subtract(b);
     return temp;
 }
Exemplo n.º 19
0
        public bool Equals(FDGVector3 p)
        {
            // If parameter is null return false:
            if ((object)p == null)
            {
                return false;
            }

            // Return true if the fields match:
            return (x == p.x) && (y == p.y) && (z == p.z);
        }