示例#1
0
        public int DotProduct(golden2D inputGolden2D)
        {
            int result = this.X * inputGolden2D.X;

            result += (this.Y * inputGolden2D.Y);
            return(result);
        }
示例#2
0
        public golden2D ScalarMult(int input)
        {
            golden2D result = new golden2D();

            result.X = this.X * input;
            result.Y = this.Y * input;
            return(result);
        }
示例#3
0
        public golden2D Subtract(int inputX, int inputY)
        {
            golden2D result = new golden2D();

            result.X = this.X - inputX;
            result.Y = this.Y - inputY;
            return(result);
        }
示例#4
0
        public golden2D Subtract(golden2D inputGolden2D)
        {
            golden2D result = new golden2D();

            result.X = this.X - inputGolden2D.X;
            result.Y = this.Y - inputGolden2D.Y;
            return(result);
        }
示例#5
0
        public golden2D Addition(int inputX, int inputY)
        {
            golden2D result = new golden2D();

            result.X = this.X + inputX;
            result.Y = this.Y + inputY;
            return(result);
        }
示例#6
0
        public golden2D Addition(golden2D inputGolden2D)
        {
            golden2D result = new golden2D();

            result.X = this.X + inputGolden2D.X;
            result.Y = this.Y + inputGolden2D.Y;
            return(result);
        }
示例#7
0
 public golden2D ScalarDiv(int input)
 {
     if (input > 0)
     {
         golden2D result = new golden2D();
         result.X = this.X / input;
         result.Y = this.Y / input;
         return(result);
     }
     else
     {
         throw new Exception("Please input the correct value");
     }
 }