IndexedVector3 v1 = new IndexedVector3(1, 2, 3); IndexedVector3 v2 = new IndexedVector3(4, 5, 6); float dot = IndexedVector3.Dot(v1, v2); Console.WriteLine("Dot product of v1 and v2: " + dot);
IndexedVector3 v1 = new IndexedVector3(1, 0, 0); IndexedVector3 v2 = new IndexedVector3(0, 1, 0); IndexedVector3 cross = IndexedVector3.Cross(v1, v2); Console.WriteLine("Cross product of v1 and v2: " + cross);In this example, two IndexedVector3 objects are created representing vectors v1 and v2. The Cross method is then called to calculate the cross product of v1 and v2. The result is printed to the console. Package library: BulletXNA.