예제 #1
0
        public void Vector2dDotProductWorks()
        {
            var v = new Vector2d(3, 4);
            var v2 = new Vector2d(8, 7);

            Assert.Equal(v.Dot(v2), 52);
        }
예제 #2
0
 public Vector2d ProjectOnto(Vector2d v)
 {
     return (this.Dot(v) / v.Dot(v)) * v;
 }